Re: RE: Sending data to a script from a form

From: Date: Mon, 07 Oct 2002 14:26:53 +0000
Subject: Re: RE: Sending data to a script from a form
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16225@lists.php.net to get a copy of this message
This behavior happens because in the php.ini there is an option "register_globals" which is turned off (as it should, as security advises)... Keep in mind that in most host providers, the stated option is turned on... As a safe and universal way to access vars, don't assume anything regarding the register_globals configuration... Cheers... Luis Ferro Uttam wrote:
use $_GET['user'] and $_GET['address']... output.php <html> <head> <title></title> </head> <body> <?php echo "welcome <b>$_GET['user']</b><p>\n\n"; echo "your address is:<p>\n\n<b>$_GET['address']</b>"; ?> </body> </html> regds, -----Original Message----- From: R Strang [mailto:r.strang@ntlworld.com] Sent: Monday, October 07, 2002 04:12 To: php-windows@lists.php.net Subject: Sending data to a script from a form hi im having problems with running PHP4 and MySQL on Windows 98 with PWS im using this simple script to input an name and dysplay it on another page it was taken from a book example but i get an error PHP Notice: Undefined variable: user in c:\Inetpub\wwwroot\output.php on
line 7 PHP                         Notice:Undefined variable: address in
c:\Inetpub\wwwroot\output.php on line 8 
input.php <html> <head> <title></title> </head> <body> <form action="output.php" method="get"> <input type="text" name="user"> <br> <textarea name="address rows="5" cols="40"> </textarea> <br> <input type="submit" value="hit it!"> </form> </body> </html> output.php <html> <head> <title></title> </head> <body> <?php print "welcome <b>$user</b><p>\n\n"; print "your address is:<p>\n\n<b>$address</b>"; ?> </body> </html>
--- [This E-mail scanned for viruses by Declude Virus]

« previous php.windows (#16225) next »