Re: isset() question

From: Date: Sun, 15 Feb 2004 17:21:20 +0000
Subject: Re: isset() question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-22823@lists.php.net to get a copy of this message
If you get a chance please run the following script _without_ entering a name in the textbox. Does the same page load after you hit submit or does a different page load? Thank you. TR ................... <html> <head> <title> Sample Page </title> </head> <body> <?php if (!isset($name) ): ?> <!-- No name has been provided, so we prompt the user for one. --> <form action="<?=$PHP_SELF?>" method="get"> Please enter your name: <input type="text" name="name" /> <input type="submit" value="GO" /> </form> <?php else: ?> <p>Your name: <?=$name?></p> <p>This paragraph contains a <a href="newpage.php?name=<?=urlencode($name)?>">link</a> that passes the name variable on to the next document.</p> <?php endif; ?> </body> </html>

« previous php.windows (#22823) next »