Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- POST problems
October 27, 2005, 5:23 pm
rate this thread
I'm creating a register form which passes some user values to my php file
here's the code:
form name="register" method="post" action="register.php">
<td><input name="user_id" type="text" value="" size="20"/> </td>
in my php file I'm trying to get the value of user_id by doing this:
$user_id = $_POST["user_id"];
but when I echo $user_id nothing appears so I guess the value isn't be
passed as I woud expect.
I'm sur eI'm making a very elementary mistake but I just cannot figure out
Any help much appreciated.
Re: POST problems
Thanks for the reply. I tried out your code and got the same error message
as with my code posted earlier - Undefined index: var in C:\webdev\test.php
on line 3 - so I guess my php must be broken somehow!! or maybe it's apache
but it all seems to be working fine. It's been a while since I've worked
with php and I don't remember altering its settings or anything.
This is very odd indeed!
I tested phpinfo() to check and that worked - im using version 5.0.4
I'm confused as to how I can solve this problem.
- » any good articles describing how to use PHP to access MySQL stored procedures?
- — Previous thread in » PHP Scripting Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum