...

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



kevinkhan
01-25-2010, 06: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


if(isset($_POST['submit']))

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

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

angst
01-25-2010, 06: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' />

mlseim
01-25-2010, 06: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"){



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum