MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
}
?>
| Manage Category List: Show: ";
if ($types[$type]) {$type = $types[$type]; }
echo"$type";
echo" / \n";
}
echo"All\n";
?> |
|
|
Name |
Description |
Type |
\n";
echo"$i | \n";
echo"$catname | \n";
echo"$catdesc | \n";
echo"$cattype | \n";
echo"\n";
}
?>
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE);
echo"The category $_POST[catname] has been Successfully Added...
";
}
?>
MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
echo"Your update to $_POST[catname], has been submitted successfully...
";
} else if ($_POST["submit"] == "Delete Category") {
$sql = "DELETE FROM `t_categories` WHERE `CategoryID`='$_POST[categoryid]'";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE);
echo"You've successfully deleted the category '$_POST[catname]'...
";
}
if (!$categoryid) { $categoryid = $_POST["categoryid"]; }
// Show Edit Form
$sql = "SELECT * FROM `t_categories` WHERE `CategoryID` = '$categoryid' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE);
$row = mysql_fetch_array($sql_result);
$categoryid = $row["CategoryID"];
$catname = $row["CatName"];
$catdesc = $row["CatDesc"];
$cattype = $row["CatType"];
?>
MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
// echo"The category $_POST[catname] has been Successfully Added...
";
//}
?>
//Add New Category:
//
?>