[eluser]quest13[/eluser]
Sorry,
this is the code :
<table>
<tr>
<th>SubcategoryId</th>
<th>CategoryId</th>
<th>SubcategoryName</th>
<th colspan="2">Action</th>
</tr>
<?php foreach($result->result_array() as $SubCat_data):?>
<tr>
<th><?=$SubCat_data['SubCategoryId'];?></th>
<th><?=$SubCat_data['CategoryId'];?></th>
<th><?=$SubCat_data['SubCategoryName'];?></th>
<?php
$subcatid=$SubCat_data['SubCategoryId'];
$catid=$SubCat_data['CategoryId'];
$catname=$SubCat_data['SubCategoryName'];
?>
<?php
echo "<th><input type=\"button\" name=\"EditSubcat\" value=\"Edit\">";
echo "<input type=\"button\" name=\"DelSubcat\" value=\"Delete\"></th>";
?>
</tr>
<?php endforeach;?>
</table>
Once I click a "Edit" button, the control should go to the function "EditSubcat" in the controller and I should be able to view the form called "Edit form".
Thank you