Form submit capture into database not working
Posted
by kielie
on Stack Overflow
See other posts from Stack Overflow
or by kielie
Published on 2010-04-14T13:44:46Z
Indexed on
2010/04/14
13:53 UTC
Read the original article
Hit count: 273
Hi guys, I have a form that has two buttons on it, one yes, one no, and at the moment I capture the clicked button into a database, but for some reason, it doesn't always capture the clicked button, I have gone through all my code and everything seems fine, here is the form
<div id="mid_prompt">
<form action="refer.php" method="post" onsubmit="return submit_form()" >
<div class="prompt_container" style="float: left;">
<span class="prompt_item"><input type="image" src="images/yes.jpg" alt="submit" name="refer" value="yes" /></span>
</div>
</form>
<form action="thank_you.php" method="post" onsubmit="return submit_form()" >
<div class="prompt_container" style="float: right;">
<span class="prompt_item"><input type="image" src="images/no.jpg" alt="submit" name="refer" value="no" /></span>
</div>
</form>
</div>
I am using sessions to carry the variables all the way to the end of the forms where I then write all the data to a database, I have checked my sessions and they seem to be working fine, the only one that is giving problems is the yes/no.
So basically I need it to capture that yes/no everytime.
Thanx in advance!
© Stack Overflow or respective owner