sungpeng Posted June 29, 2010 Share Posted June 29, 2010 <?php include "config.php"; $code="<form action='https://www.paypal.com/cgi-bin/webscr' method='post'> <input type='hidden' name='cmd' value='_s-xclick'> <input type='hidden' name='hosted_button_id' value='KC2XXFRYLSBF6'> <input type='image' src='https://www.paypal.com/en_GB/SG/i/btn/btn_buynowCC_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online.'> <img alt='' border='0' src='https://www.paypal.com/en_GB/i/scr/pixel.gif' width='1' height='1'> </form> "; echo "$code"; mysql_query("INSERT INTO paybutton (code) VALUES ('$code')")or die(mysql_error()); ?> I have an error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'https://www.paypal.com/cgi-bin/webscr' method='post'> " I don't know what went wrong. Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/206139-syntax-error/ Share on other sites More sharing options...
trq Posted June 29, 2010 Share Posted June 29, 2010 $code = mysql_real_escape_string($code); mysql_query("INSERT INTO paybutton (code) VALUES ('$code')")or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/206139-syntax-error/#findComment-1078547 Share on other sites More sharing options...
sungpeng Posted June 29, 2010 Author Share Posted June 29, 2010 hi thorpe thk so much for your help Quote Link to comment https://forums.phpfreaks.com/topic/206139-syntax-error/#findComment-1078552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.