RE: [PHP] not getting form variables using POST.

From: Date: Sat, 28 Oct 2000 04:08:00 +0000
Subject: RE: [PHP] not getting form variables using POST.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22412@lists.php.net to get a copy of this message
Thanks a lot. It worked. I didn't realize that I had to make all the variables global. I haven't made them global, but passed the values as parameters. (old C coding habit of mine :) ) Thanks everyone. On Fri, 27 Oct 2000, Jason Stechschulte wrote: > Is the PHP code inside of a function? If so, you will have to do > something like this: > > global $uname, $passwd; > > or > > global $HTTP_POST_VARS; > > If you do the latter, you will have to refer to them as > $HTTP_POST_VARS[uname]. > > Jason Stechschulte > jpstech@nc.edu > > > yes. > I'm using it as below > > ------------ part of html file ------------------ > <form action="Login.php" method="post"> > <input type="text" name="uname" size=10> > <input type="hidden" name="passwd" size=10> > <input type="submit"> > </form> > > ---------- part of php script -------- > if($uname="123456" && $passwd="654321") > give_access(); > else error_msg("Sorry"); > --------------------------------------- > > On Fri, 27 Oct 2000, Dominick Vansevenant wrote: > > > By their names preceded by a $ sign? > > > > D. > > > > -----Original Message----- > > From: Deepak Chawla [mailto:dchawla@usa.unl.edu] > > Sent: vrijdag 27 oktober 2000 12:19 > > To: php-general@lists.php.net > > Cc: dchawla@usa.unl.edu > > Subject: [PHP] not getting form variables using POST. > > > > > > Hi! > > I have recently started working on web applications and am > using php4. > > I have a problem. I'm using HTML forms and sending form data to > a php > > script via POST method. Earlier the method was working. Now for > some > > reason, I don't get values in the variables. > > Correct me if I'm wrong, I understand that we can access form > variables > > by their names in php scripts. > > > > any help would be appretiated. > > > > Thanks > > -deepak > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#22412) next »