I am trying to store a variable in a database when the user clicks the submit button. However, as my submit button is inside of a PHP variable when I am using isset, it doesn't work. Is there another solution or a trick to that?
$pp_checkout_btn .= '<form id="paypal" action="https://www.paypal.com/cgi-bin/webscr" 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($_POST['submit1'])){
//update orders to accept terms
$updatesql=mysql_query("UPDATE orders SET terms='agree' WHERE checkout_id='$checkout_id'") or die(mysql_error()); }
paypal.com, you will never see the request. Check the PayPal developer manual on how to integrate it with your site.