Detecting an image form submission via PHP

From: Date: Fri, 21 Sep 2001 13:30:04 +0000
Subject: Detecting an image form submission via PHP
Groups: php.general 
Request: Send a blank email to php-general+get-68145@lists.php.net to get a copy of this message
Hi, When a form is submitted using a standard SUBMIT button it is possible to catch this via php using if ($submit) but how do you catch this if you are using an image for submitting instead of the button? Any help would be greatly appreciated. Here is a cut down version of my code: ############################# <?php if ($submit) { echo "<script>alert(\"submitted\");</script>"; } else { echo "<script>alert(\"not submitted\");</script>"; } ?> <form name="formMoviesSearch" method="post" action="movies_search2.htm"> <!-- both methods put here for testing --> <input type="image" border="0" name="sub" src="movies.gif"> <input type="submit" name="submit" value="go"> </form> ############################# Neil -------------------------------- Email: neil.freeman@asa.co.uk neil_freeman@yahoo.com --------------------------------

« previous php.general (#68145) next »