kevinkhan Posted January 25, 2010 Share Posted January 25, 2010 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.. Quote Link to comment Share on other sites More sharing options...
akitchin Posted January 25, 2010 Share Posted January 25, 2010 you could try adding something to the value attribute of the input. i'm not sure if that would help for an "image" input type. perhaps simply use another one of the form elements? if it's the only form element, you could always add a hidden one. Quote Link to comment Share on other sites More sharing options...
jl5501 Posted January 25, 2010 Share Posted January 25, 2010 I think the last answer is correct. You will get $_POST['submit'] set, if the field has a value Quote Link to comment Share on other sites More sharing options...
manwhoeatsrats Posted January 25, 2010 Share Posted January 25, 2010 Just an observation. you do not have a value for your submit button. how can you have a post variable if it has no value.....I suppose it is possible it could be NULL or empty...... I would try to do this. <input class="send" type="image" src="images/submit.gif" name="submit" value="submit" /> Not sure if that will fix your issue....it might not Quote Link to comment Share on other sites More sharing options...
kevinkhan Posted January 25, 2010 Author Share Posted January 25, 2010 Just an observation. you do not have a value for your submit button. how can you have a post variable if it has no value.....I suppose it is possible it could be NULL or empty...... I would try to do this. <input class="send" type="image" src="images/submit.gif" name="submit" value="submit" /> Yes this worked, Thanks... Quote Link to comment Share on other sites More sharing options...
akitchin Posted January 25, 2010 Share Posted January 25, 2010 three cheers for repetition! marking as solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.