1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php require("configure.php");
if (!isset($_SESSION["cmslogin"])) { header("Location: login.php"); exit; }
$catid = $_POST["catid"]; $catname = htmlspecialchars($_POST["catname"], ENT_QUOTES); $cathyperlink = htmlspecialchars($_POST["cathyperlink"], ENT_QUOTES); $cattitle = htmlspecialchars($_POST["cattitle"], ENT_QUOTES);
$sortby = $_POST["sortby"]; $templateid = $_POST["templateid"];
$sql = "update categories set catid='$catid', catname='$catname', sortby='$sortby', templateid='$templateid', cathyperlink='$cathyperlink', cattitle='$cattitle' "; $sql .= " where catid=" . $catid . " "; mysql_query($sql); mysql_close($dbh);
header("Location: categoriesindex.php?pid=$catid&msg=Update Successful"); ?>
|