Re: simple online form stuck at !isset($first) condition
| From: | Curt Zirzow | Date: | Tue, 16 Sep 2003 00:22:50 +0000 |
| Subject: | Re: simple online form stuck at !isset($first) condition | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162686@lists.php.net to get a copy of this message | ||
* Thus wrote Wei Wang (ww220@cam.ac.uk):
>
> <? function show_form($first="",$last="") { ?>
>
> <form action="formprac.php" method="POST">
note the method ----------------------^^^^
> First Name:
> <input type=text name=first value="<?echo $first?>">
> <br>
> Last Name:
> <input type=text name=last value="<?echo $last?>">
> <br>
>
> <input type=submit>
> </form>
>
> <? }
>
>
> if(!isset($first)) {
make this
if (!isset($_POST['first'])) {
see:
http://php.net/language.variables
http://us3.php.net/register_globals
Curt
--
"I used to think I was indecisive, but now I'm not so sure."