Page 1 of 1

I can not read $_POST

Posted: Fri Jul 11, 2003 11:34 am
by 8370
Hello!

I have a form with method post, action ="show.php" and a text field named "txt". But when i use

Code: Select all

print($_POSTї"txt"]);
in
show.php it doesn't display any thing. I have track_vars and
register_globals enabled in php.ini.

Thanks.

Posted: Fri Jul 11, 2003 12:16 pm
by DuFF
It would be a lot easier to help you if you posted the entire code of both pages.

Posted: Fri Jul 11, 2003 2:20 pm
by m3rajk
try ' instead of "

Posted: Fri Jul 11, 2003 2:37 pm
by nielsene
What version of PHP? If its older (4.1.x series I beleive) you'll need to use $HTTP_POST_VARS["txt"] instead of $_POST["txt"];

Posted: Fri Jul 11, 2003 2:46 pm
by m3rajk
besides just the $_GET and $_POST issues, there's other reasons you should upgrade to 4.2 or higher

Posted: Fri Jul 11, 2003 9:27 pm
by m3mn0n
Try $_REQUEST also.

Posted: Fri Jul 11, 2003 9:42 pm
by m3rajk
sami: $_request in the last part of the egpcs or whatever order to have something with that name.

it's also only available above 4.1

Posted: Sat Jul 12, 2003 5:40 am
by mikeb
I've just spent a week working until after midnight trying to solve a similar issue. As a newbie I feel your pain. My $post would not work on a very simple form. With (AMAZING!) help from others on the forum I have managed to get it working only by upgrading to the very latest version of php and following the manual installation instructions. I'm using the php version 5 beta under apache 2 as a cgi installation all on win2k. This upgrade seems to have solved the issue and my forms are working fine. Hope that's of some help!