Forms help
Posted: Sat Dec 27, 2003 12:20 pm
I need to be able to show a list of category titles in a database with a link to another form that show all the detail of the category, where I can edit the info.
I have the following that lists out the categories but, how do I get individual details to show. This file is called as an include so I assume the details form should be in the same file.
I have the following that lists out the categories but, how do I get individual details to show. This file is called as an include so I assume the details form should be in the same file.
Code: Select all
<?php
$skinz = my_conn();
$query_list_cats = "SELECT * FROM skinz_categories ORDER BY cat_name ASC";
$list_cats = mysql_query($query_list_cats, $skinz) or die(mysql_error());
$row_list_cats = mysql_fetch_assoc($list_cats);
$totalRows_list_cats = mysql_num_rows($list_cats);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6"><img src="images/tile_back_l.gif" alt="" border="0"></td>
<td align="left" class="maintitle"><img src="images/nav_m.gif" alt="" width="17" height="8" border="0">Edit Categories</td>
<td width="6"><img src="images/tile_back_r.gif" alt="" border="0"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
<tr>
<td width="33%" align="center" class="darkrow1">Title</td>
<td width="33%" align="center" class="darkrow1">Edit</td>
<td width="33%" align="center" class="darkrow1">Remove</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_list_catsї'cat_name']; ?></td>
<td width="33%" align="center"><a href="<?php echo $row_list_catsї'cat_id']; ?>">Edit</a></td>
<td width="33%" align="center"><a href="<?php echo $row_list_catsї'cat_id']; ?>">Remove</a></td>
</tr>
<?php } while ($row_list_cats = mysql_fetch_assoc($list_cats)); ?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6" height="9"><img alt="" src="images/bottom_left.gif"></td>
<td width="100%" background="images/bottom.gif"><img alt="" src="images/bottom.gif"></td>
<td width="6" height="9"><img alt="" src="images/bottom_right.gif"></td>
</tr>
</table>
<?php
mysql_free_result($list_cats);
?>