Re: how do I use same page for submit and results?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> But now I'm not using anything that I can check except for the
> button click. Any ideas how to do this?

assign a name to the button and check for that.

<input type="submit" name="action" value="Show List">

...

if ($_REQUEST["action"] == "Show List") {
   /* form was submitted */
   ...
} else {
   /* form hasn't been submitted, show it */
   ...
}


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux