Link to home
Start Free TrialLog in
Avatar of a0k0a7
a0k0a7Flag for United States of America

asked on

Help to add a condition that executes onClick


On the line of code below I have a Yes and No button;

$error = "<center>Welcome, Do you want to redeem this voucher <br><input type=submit value=yes />&nbsp;&nbsp;<input type=submit value='no' /></center>";

This information later displayed by this line:

<?
if($error){ ?><div style=" background:#FFFFCC; padding:5px; border:solid #FF0000 1px;"><?=$error?></div><? }
?>

I would like to execute an insert into the database if the user press yes, if the user press no I want to send the user to specific URL, how I do that, any ideas or advice is appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of a0k0a7

ASKER

Thank You!