View Full Version : Need to check if a form has been sumitted.

01-25-2010, 07:15 PM
for the form submit button i have

<input class="send" type="image" src="images/submit.gif" name="submit" /></p>

but when i check for this condition it doesn't recognize it


Why is this and what other condition could i use..

The above works if i change type image to type submit..

01-25-2010, 07:23 PM
what I normally do is just add an action field to the form,

so you could either have it in the form url like: action='MyPage.php?action=submit'
or you could use a hidden field in the form, like: <input type='hidden' name='action' value='submit' />

01-25-2010, 07:24 PM
I'm not sure why, but you can put this line right above it and check for it instead.

<input type="hidden" name="verify" value="123">

if($_POST['verify'] == "123"){