15 Reputation Points
Ranked #2K
- Strength to Increase Rep
- +1
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
~272 People Reached
About Me
Author of PHP Brilliance, former chief architect and development manager. Slave to two cats.
- Interests
- All manner of techie and coding nonsense
Favorite Forums
Web Development x 1
Favorite Tags
php x 1
Re: Your problem seems to be that you're not enclosing your text value in single quotes - it should be `'{$cart[$i]['option']}'` A la: for($i=0;$i<$j;$i++){ mysql_query("INSERT INTO buy_detail(id_orders, id_product, qty, option) VALUES('$id_orders',{$cart[$i]['id_product']}, {$cart[$i]['qty']}, '{$cart[$i]['option']}')");} However, do you actually need to modify the data at all in between the select and the insert? … |