Posts
 
Reputation
Joined
Last Seen
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
1 Commented Post
0 Endorsements
Ranked #107.49K
Ranked #4K
~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
Favorite Tags
php x 1
Member Avatar for prieku

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? …

Member Avatar for diafol
0
272