two buttons on one form
i have form has 1 (image) submit buttong , check box. if try press button take new page before check box ticked brings alert.
i want add button send check box information phpmyadmin sql db.
here have far
form:
<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="submit" name="button" value="confirm" />
<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>
error message:
<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 signature agreement:</strong><br /></td>
</tr>
<tr>
<td>this error message</td>
</tr>
<tr>
<td><strong>terms , conditions</strong></td>
</tr>
<tr>
<td>terms go here</td>
</tr>
<tr>
<td>i have read , understand statement above</td>
</tr>
<tr>
<td>signed:<img src="signatures/<?php echo $row_recordset1['tensig']; ?>" alt=""/></td>
</tr>
<tr>
<td>guarantor signature:<img src="signatures/<?php echo $row_recordset1['gusig']; ?>" alt=""/></td>
</tr>
</table>
so want add button when submitted send checkbox "y" db sends them page, can click other button , log elease.php page
thanks in advance
sorry, don't understand logic of you're trying do.
as far can see, want make sure user has selected check box before being able proceed. check box name isn't sent form data if check box hasn't been selected when form submitted.
let's check box called "agree". can test see whether has been checked this:
if (!isset($_post['agree'])) {
// return user original form error message
} else {
// process form
}
message edited by: david_powers clarify happens if check box isn't selected.
More discussions in Develop server-side applications in Dreamweaver
adobe
Comments
Post a Comment