I have a form, example:
<form method="post" action="some external URL">
<input type="hidden" id="id" name="session_id" />
<input type="hidden" id="val1" name="val1" />
<input type="hidden" id="val2" name="val2" />
<input type="submit" value="Send" />
</form>
I need to save this data into mySQL before sending it into “some external url” – let’s say that my “saving to database” script is on “script/save” url. How can I transfer my data there before sending it throught this form?
EDIT
It would be nice, when my form will only be sent to “some external url” when the “script/save” gives POSITIVE RESPONSE.
Could you help me with that too?
Hey just use an ajax call onsubmit then submit the form when the ajax call is done