leighhobson89 Posted March 16, 2007 Share Posted March 16, 2007 Hi, I have a question here. Assuming all the variable names are spelt correctly etc, is there any reason why this wont insert the data into the database (the cart), yet it goes to URL shopping.php as its supposed to. It was working, but i did one thing trying to fix another glitch and now it wont write the data in, i assume it will be something really simple. (The variables collect data from a previous screen successfully and display it here, so its not that either, and the form has been closed correctly.) Here's the code anyway... echo"<input name='checkout' type='submit' value='Add to Cart!' onclick='mysql_query('INSERT INTO `lptCart` (`department`,`product`,`colour`,`size`,`quantity`,`totalprice`,`Remove`) VALUES(`$Row[department]`,`$Row2[product]`,`$Row3[colour]`,`$Row4[size]`,`$quantity`,`$totalprice`,`$remove`)') or die(mysql_error());'/>"; Hope some1 can help me! Link to comment https://forums.phpfreaks.com/topic/43002-entering-data-into-database-for-shopping-cart/ Share on other sites More sharing options...
interpim Posted March 16, 2007 Share Posted March 16, 2007 n/m Link to comment https://forums.phpfreaks.com/topic/43002-entering-data-into-database-for-shopping-cart/#findComment-208855 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.