dh526 Posted May 26, 2009 Share Posted May 26, 2009 The values of $cardid etc are from some tables and they are all echoed out correctly and do return a number... (or email address) <form method='POST' action='buy.php'> <input type='hidden' value=$cardid name='cardid' /> <input type='hidden' value=$addid name='addid' /> <input type='hidden' value=$email name='email' /> <input type='hidden' value=$prodid name='prodid' /> <input type='submit' value='confirm order' > </form> Then on the next page I want to insert these values into a table. So I have done this : $conn=odbc_connect('db09','',''); $sql="INSERT INTO tblOrders (ProductID, username, AddressID, CardID ) VALUES ($product,'$username', $addid, $cardid)"; but it doesn't work. I get a [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement error. What is wrong ?? can anyone help?? thank you in advance Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted May 26, 2009 Share Posted May 26, 2009 you forgot single quotes around some of the variables in the VALUES Quote Link to comment Share on other sites More sharing options...
dh526 Posted May 26, 2009 Author Share Posted May 26, 2009 Cheers dude Quote Link to comment 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.