i am trying to store a variable in database when the user clicks the submit button. However as i my submit button is inside a php variable when i am using isset doesnt work. is there another solution or a trick to that?
my code follows:
$pp_checkout_btn .= '<form id="paypal" action="http://ift.tt/rDmnwQ" method="post">
<input name="terms" type="checkbox" required value="agree" form="paypal" /><label>Agree with terms & Conditions *</label>
<input type="submit" name="submit1" id="changebutton" value="ΕΠΙΒΕΒΑΙΩΣΗ ΠΑΡΑΓΓΕΛΙΑΣ" /></form>';
if(isset("submit1")){
//update orders to accept terms
$updatesql=mysql_query("UPDATE orders SET terms='agree' WHERE checkout_id='$checkout_id'") or die(mysql_error()); }
Any help will be much appreciated, Thank You.
Aucun commentaire:
Enregistrer un commentaire