Location: PHPKode > projects > PHP Enter > www/admin/setcat.php
<?php include('header.php'); include('options.php');
$id = $_GET['id'];
?>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="8" bgcolor="#FFFFFF">
<tr><td><strong>Manage Top Categories</strong></td><tr>
<tr><td width="450px">
<?php
$id = $_GET['id'];
$result = mysql_query("SELECT * FROM categori WHERE catid='$id'");
while($row = mysql_fetch_array($result)) {
echo"<br /><center><font size=2 color=green>";
if(isset($_POST['submit']))
{
$caty = $_POST['caty'];
mysql_query("UPDATE categori SET name='$caty' where catid = '$id'")
or die(mysql_error());
echo"Successfully.</center>";
}else{
?>
<center>
<div id=vforms>
<form method="post" action="setcat.php?id=<?php echo $id ?>">
<font color=#3A586A>New Category Name</font><br />  <input name="caty" value="<?php echo $row['name']; ?>" size="40" maxlength="255"><br />
<br /><br />
<input type="submit" name="submit" value="New Category Name">
</form><br />
<a href="deletecat.php?id=<?php echo $id ?>"><font size="1 "color="red">DELETE THIS CATEGORY</font></a><br /></td></tr></table>
<?php
}
}
?></div></center>
</td></tr>
</table>
Return current item: PHP Enter