one form button two function
Posted: Mon Oct 08, 2012 7:56 am
I have a form with a checkbox and an image button. If the tick box isnt selected then the user gets an alert. if the tick box is selected and they submit the button they are sent to a new page. I need another function aswell. when the tick box is check and the button is selected i need for the information to be sent the the DB (mySQL),
this is what i have currently
this is what i have currently
thanks in advance<form action="eLease.php?userid=<?php echo $row_Recordset1['userid']; ?>" method="post" name="form2" target="_new" id="form2">
<div align="right"><span id="sprycheckbox2">
<span class="body-text">Lease Schedule</span><br />
<input type="image" src="../images/smalldownload.png" width="35" height="35" alt="download" value="submit"/>
</a>
<input type="checkbox" name="leaseshedule" id="leaseshedule" />
<br />
</span></div>
</form>
<div id="ErrorZone1"><span class="checkboxRequiredMsg"><table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><table width="400" border="0" cellspacing="10" cellpadding="0">
<tr>
<td><strong>Electronic Agreement:</strong><br /></td>
</tr>
<tr>
<td>By you ticking the box above 'TickBox',you agree to the terms</td>
</tr>
<tr>
<td><strong>Terms and Conditions</strong></td>
</tr>
<tr>
<td>I have read and understand the statement above</td>
</tr>
</table></td>
</tr>
</table>
</span></div>