2 Submit Buttons 2 Actions Same Form Data
Posted: Mon Jan 26, 2015 2:55 pm
I'm a shade tree programmer trying solve this. I want my users to have 2 buttons giving them the option of paying by Paypal or Escrow after filling out a form.
This is the code I have now:
Any ideas?
This is the code I have now:
Code: Select all
<?php if ($items['paypal'] == '1'): ?>
<form action='submitPaypalBuy.php' method='post' target='_top' onclick='exit = false'>
<center><table>
<tr><td><font color="316331"><b>Name</b></font></td><td><input type='text' name='name' /></td></tr>
<tr><td><font color="316331"><b>Phone Number</b></font></td><td><input type='text' name='phone' /></td></tr>
<tr><td><font color="316331"><b>Email Address</b></font></td><td><input type='text' name='email' /></td></tr>
<tr><th colspan='2'><input type='submit' value='Submit' /></th></tr>
</table>
</form>
<?php else: ?>
<form action='submitEscrow.php' method='post' target='_top' onclick='exit = false'>
<center><table>
<tr><td><font color="316331"><b>Name</b></font></td><td><input type='text' name='name' /></td></tr>
<tr><td><font color="316331"><b>Phone Number</b></font></td><td><input type='text' name='phone' /></td></tr>
<tr><td><font color="316331"><b>Email Address</b></font></td><td><input type='text' name='email' /></td></tr>
<tr><th colspan='2'><input type='submit' value='Submit' /></th></tr>
</table>
</form>
<?php endif; ?>