Newb question won't post from a input field
Posted: Mon Aug 18, 2003 1:00 am
I think that's a good description, and I apologize if this is a dumb question. I have been coding in php for exactly 1 day now.
Ok first page has text input fields for a sign up page. When you submit it runs this:
<form action="confirm.php" method=post>
The specific field where I am trying to pull from:
<INPUT TYPE="Text" NAME="user" SIZE="15" MAXLENGTH="30">
<b>Username</b>
It then goes to the confirm page:
At the top I have in php quotes:
//create short variable names
$user = $http_post_vars['user'];
Then down where I want it to post in php quotes I have:
echo $user;
I get no error message, and where I should see the entered username it's blank. I am using examples from my book, so I am almost positive the code is correct. Any suggestions?
Also I tried to read the stickies up top and I hope this is in the correct formatting. Please correct me if I have erred.
Edit: I originally tried this with the medium version:
//create short variable names
$user = $_post['user'];
I thought maybe the php version was older so I went with the long version. I just checked the php version and it is 4.3.1
Ok first page has text input fields for a sign up page. When you submit it runs this:
<form action="confirm.php" method=post>
The specific field where I am trying to pull from:
<INPUT TYPE="Text" NAME="user" SIZE="15" MAXLENGTH="30">
<b>Username</b>
It then goes to the confirm page:
At the top I have in php quotes:
//create short variable names
$user = $http_post_vars['user'];
Then down where I want it to post in php quotes I have:
echo $user;
I get no error message, and where I should see the entered username it's blank. I am using examples from my book, so I am almost positive the code is correct. Any suggestions?
Also I tried to read the stickies up top and I hope this is in the correct formatting. Please correct me if I have erred.
Edit: I originally tried this with the medium version:
//create short variable names
$user = $_post['user'];
I thought maybe the php version was older so I went with the long version. I just checked the php version and it is 4.3.1