How to write codes for email message in php

Titsboimi

New Member
I have the following form.\[code\]<h1>Please Confirm Your Order</h1><p class="padnmgn">Please confirm your order before clicking the Email Your Order Now button below. If you have changes,<?php echo anchor("myshop/cart", "go back to your shopping cart");?>.</p><br /><form method="POST" action="myshop/emailorder" accept-charset="utf-8"><?php$TOTALPRICE = $_SESSION['totalprice'];if (count($_SESSION['cart'])){ $count = 1; foreach ($_SESSION['cart'] as $PID => $row){ echo "<p class='padnmgn'><b>". $row['count'] . " " . $row['name'] . " @ " . $row['price']."</b></p><br/>\n"; echo "<input type='hidden' name='item_name_".$count."' value='".$row['name']."'/>\n"; echo "<input type='hidden' name='item_quantity_".$count."' value='".$row['count']."'/>\n"; echo "<input type='hidden' name='item_price_".$count."' value='".$row['price']."'/>\n"; echo "<input type='hidden' name='item_currency_".$count."' value='http://stackoverflow.com/questions/1984720/NOK'/>\n"; echo "<input type='hidden' name='ship_method_name_".$count."' value='http://stackoverflow.com/questions/1984720/Posten'/>\n"; echo "<input type='hidden' name='ship_method_price_".$count."' value='http://stackoverflow.com/questions/1984720/65.00'/>\n"; $TOTALPRICE += 65; $count++; }}echo "<p class='padnmgn'><b>SHIPPING: 65</b></p>\n";echo "<p class='padnmgn'><b>TOTAL (w/shipping): ". $TOTALPRICE. "</b></p>\n";echo form_submit('submit', 'Email Order!');?></form>\[/code\]I want to make it to send an email to me when a customer click "Submit".I want to add the subject and message with the details and total since I am not storing the details in my database.I am looking for code or resources so that I can modify them.
 
Top