php - $_POST does not work on the server -
i tried make little form worked fine. wanted test on server doesn't save values.
var_dump($_post);
returns:
array(4) { ["name"]=> string(0) "" ["pass"]=> string(0) "" ["e-mail"]=> string(0) "" ["register"]=> string(12) "registieren!" }
on local server, but
array(0) { }
on normal server.
enable_post_data_reading
is "on" on both.
does have ideas?
edit:
i think got error. phpinfo() returns:
request_method post
on local server and
request_method
on webserver. how can change - didn't find useful stuff
here more code:
define('url', 'http://localhost/'); define('website_name', 'project/'); define('urlgame', 'u/'); define('lang', 'en/');
here form doesn't work:
<form method="post" action="'.url.website_name.lang.urlgame.'register">
in browser looks this:
<form method="post" action="http://localhost/project/en/u/register">
it same stuff on server, definitions:
define('url', 'http://yangidu.de/'); define('website_name', 'yang/'); define('urlgame', 'u/'); define('lang', 'en/');
and in browser looks this:
<form method="post" action="http://yangidu.de/yang/en/u/register">
this button (same on both versions):
<input id="submit" type="submit" name="register" value="registieren!" />
if type in:
var_dump($_post);
it returns
array(4) { ["name"]=> string(3) "asd" ["pass"]=> string(3) "asd" ["e-mail"]=> string(3) "asd" ["register"]=> string(12) "registieren!" }
on local server,
array(0) { }
on server.
i think error because request_method not same. (i got phpinfo()) on local server it's:
request_method post
and on server it's:
request_method
i got error: webserver redirected me everytime , because of $_post got lost. changed action="" "real" source of website , because of website didn't reload 2 times.
anyway thank guys!
Comments
Post a Comment