i have table here
<?php if ( !empty($kirim) )
{
$no = 1;
foreach ($kirim as $row) { ?>
<tr id="row">
<td id="no"><?php echo $no;?></td>
<td id="judul"><?php echo $row->Kode_Kategori_Material_Jasa;?></td>
<td id="kategori"><?php echo $row->Nama_Material_Jasa;?></td>
<td id="action"> Edit | Delete </td>
//idk how to pass the value for updating
//and using YES or NO DialogResult for deleting
</tr>
<?php
$no++;
}
}
else { ?>
<tr id="row">
<td colspan="6" align="center">Tabel Kosong</td>
</tr>
<?php
}
?>
and i want to pass the Kode_Kategori_Material_Jasa and Nama_Material_Jasa to another form, so we can update the values there, and update the DB record. i have made the form and i confuse to pass the value direct to the update form. or pass them to the controller, then pass it again to the update form.
i was adding some code here
<td id="action"> <a href="<?php echo site_url('/c_kategorimaterial/ubah/').$row->Kode_Kategori_Material_Jasa/$row->Nama_Material_Jasa; ?> ">Edit </a>| Delete </td>
then i got error like Division by zero
The way I would do it is using either POST or GET (depending how sensible is your data).
Using GET:
Notice you missed
."/".between the first and the second time you echo$row->Kode_Kategori_Material_JasaUsing POST
Define a field in your form like:
Retrieve the value in the destination controller (the one you set in you
action=URLin the form tag) by using$_POST