Jump to content

Need to check if a form has been sumitted.


kevinkhan

Recommended Posts

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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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... :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.