Re: Re: [PHP] Problem of varibles between webpages

From: Date: Fri, 24 Dec 2004 03:36:21 +0000
Subject: Re: Re: [PHP] Problem of varibles between webpages
Groups: php.general 
Request: Send a blank email to php-general+get-205116@lists.php.net to get a copy of this message
> From: edwardspl@ita.org.mo > For table form format ( sample ), > > <form method="" action=""> > <table> > <tr><td>Your Name : </td><td><input name="name" size=30 > maxlength="60"></td></tr> > <tr><td>Address?</td><td><input name="address" size=30 > maxlength="60"></td></tr> > </table> > </form> > > "name" and "address" is varible, so how can we pass these two varible > without register_globals function ( actually it is disable ) to another webpage ? Did you read what I wrote? register_globals has nothing to do with how you pass variables. You create a form the same way with it ON or OFF... The difference is in how you access the variables in the PHP script. In this instance, since you haven't specified a method for your form, GET is assumed. So you can access the form variables in $_GET['name'] and $_GET['address']. If you used POST in your form method, then $_POST['name'] and $_POST['address'] can be used. Regardless of the method, you can use $_REQUEST['name'] and $_REQUEST['address']... catching on? ;) ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html

« previous php.general (#205116) next »