[eluser]danfloun[/eluser]
Hi,
I'm pulling some info from my database and laying it down like so:
Code:
<table>
<tr>
<th>Id</th>
<th>Company</th>
<th>First Name</th>
<th>Last Name</th>
<th>Landline Tel</th>
<th>Mobile Tel</th>
<th>Fax Tel</th>
<th>Email</th>
</tr>
<?php foreach($query->result() as $row): ?>
<tr><a href="<?=site_url('main/client_detail/' .$row->id);?>">
<td><?=$row->company;?></td>
<td><?=$row->first_name;?></td>
<td><?=$row->last_name;?></td>
<td><?=$row->landline_tel;?></td>
<td><?=$row->mobile_tel;?></td>
<td><?=$row->fax_tel;?></td>
<td><?=$row->email;?></td></a>
</tr>
<?php endforeach;?>
</table>
Probably a crap way to do it, but nevertheless it works except I'm not sure how to make each full row linkable to the details page. I've checked an old project and the above worked but not here.
I'm sure the link I have is completely wrong so if anyone can help that would be cool.
I don't just want one column to be linkable I want the whole row.
Thanks
Danny