lakota Posted January 15, 2007 Share Posted January 15, 2007 Hi Everyone!Sorry! I had started this on another topic, but I couldn't get in an add the extra bit of code :o(I have a very simple shopping cart, and I'd like to be able to email an order when it gets submitted. Along with the user details.My code works and everything, I just don't know how to go about emailing each line of the order.This is the relevant code:while ($cart_info = mysql_fetch_array($get_cart_res)) { $id = $cart_info['id']; $item_title = stripslashes($cart_info($cart_info['item_title']); $item_price = $cart_info['item_price']; $item_qty = $cart_info['sel_item_qty']; $total_price = sprintf($item_price * $item_qty); $msg = "Online Order \n\n"; $msg .= "* ".$item_qty." x ".$item_title." at $".item_price." each. \n";}Please help :'([attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
lakota Posted January 16, 2007 Author Share Posted January 16, 2007 Hi Guys! I had a reply elsewhere, and I think I have a fix.I just need to either movie my first $msg = or change to $msg .=.Thanks! Quote Link to comment Share on other sites More sharing options...
fenway Posted January 16, 2007 Share Posted January 16, 2007 Yeah, you need to only assign the variable once, outside the loop. 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.