On Wednesday 04 August 2004 17:34, Craig Donnelly wrote:

> If you want to test to see if a form has been submitted, I would suggest
> that you
> use the name from the submit button.
>
> e.g - <input type="submit" value="Send Form Data" name="sendform">
>
> if(isset($_POST['sendform'])){
>     echo "Form has been submitted!";
> }
>
> So basically this checks if the form button "sendform" is set.

This is not reliable, some browsers does not set the submit button if it was 
not explicitly clicked on. Even some big name free webmail providers fall 
into this trap of just checking for the submit button rather than checking 
the form as a whole.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The biggest difference between time and space is that you can't reuse time.
                -- Merrick Furst
*/

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

Reply via email to