[eluser]Perkin5[/eluser]
I want to be able to email the contents of a shopping cart to a customer. I've come up with the following code to embed the cart data in a form but codeigniter is throwing an error. Am I doing this the right way?
Code:
<div>
<?php echo form_open('shop/send'); ?>
<?php echo form_input('to''To: website.co.uk') ?>
<?php echo form_textarea("","
if ($cart = $this->cart->contents()): ?>
<table>
<thead>
<tr>
<th>Item Name</th>
<th>Quantity</th>
<th>Price</th>
<th></th>
</tr>
</thead>
<?php foreach ($cart as $item): ?>
<tr>
<td><?php echo $item['name']; ?></td>
<td><?php echo $item['qty']; ?></td>
<td>£<?php echo $item['subtotal']; ?></td>
</tr>
<?php endforeach; ?>
<tr>
<td colspan="2"><strong>Total</strong></td>
<td>£<?php echo $this->cart->total(); ?></td>
</tr>
</table>
<?php endif;?>
<?php "); ?>
<?php echo form_close(); ?>
</div>