Hi, hoping some one can help with this one.
I have a simple shopping cart script which is working great but I want to mail the contents of the cart using the PHP mail function which is baffling me.
If I want to print the contents to screen i.e. show the contents of the cart
then I use this code which works fine:
echo"<th>REF</th><th>Item</th><th>Qty</th><th>Price</th><th>Subtotal</th><th></th></tr>";
foreach($cart->get_contents() as $item) {
echo "<input type='hidden' name='id' value='$id'/>";
echo"<input type='hidden' name='baskettotal' value='$baskettotal'/>";
echo"<input type='hidden' name='fintotal' value='$fintotal'/>";
echo "<tr><td align=\"center\">".$item['id']."</td>";
echo "<td>".$item['info']."</td>";
echo "<td align=\"center\">".$item['qty']."</td>";
echo "<td align=\"right\">£".number_format($item['price'],2)."</td>";
echo "<td align=\"right\">£".number_format($item['subtotal'],2)."</td>";
$tid=$item['id'];
echo"<td><a href=\"$PHPSELF?id=$tid&remove=1\"><img src=\"images/delete.gif\" border=\"0\"></a></td></tr>";
}
The question is how do I do the same in an email using PHP mail.?