Jump to content

[SOLVED] submit form


csckid

Recommended Posts

Does your form actually have the id='myform' attribute set?

 

As a quick way to test if you're actually ending up at the right place you could do a

alert( document.getElementById('myform') );

If it comes up with "undefined" then it can't find the form, your syntax itself seems to be correct, above post is just another way to reach the same node.

Link to comment
Share on other sites

Then it's not a javascript problem, did you do a "print_r( $_POST );" ? that way you'll know if theres at least something in it.

If there isn't anything at all in it we're going to need some more information like a link to the page or the form element including it's content as used on your page.

Link to comment
Share on other sites

I have a new different problem.......... I have a <select> when i select an option, the form submits, but selected option changes.. how can i keep the selected option unchanged even if the form submits

 

i thought this might work header("Cache-control: private");

it didnt

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.