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
26
27
|
<?php require("configure.php"); ?> <? $pagecontentid = $_POST["pagecontentid"]; $catid = $_POST["catid"]; //$contenttitle = $_POST["contenttitle"]; //$contenttitle = str_replace("'", "\'",$contenttitle); //$contenttitle = str_replace("\"", """, $contenttitle); //$contenttitle = htmlspecialchars($contenttitle, ENT_QUOTES);
//$pagecontentdesctc = $_POST["pagecontentdesctc"]; $pagecontentdesctc = preg_replace("/'/","\'",$_POST["pagecontentdesctc"]);
$sql = "select max(pagecontentid) as maxid "; $sql .= "from pagecontent"; $result=mysql_query($sql); $row = mysql_fetch_array($result,MYSQL_ASSOC); $pagecontentid = $row{maxid}+1;
$sql = "insert into pagecontent (pagecontentid, catid, pagecontentdesctc) values ('$pagecontentid', '$catid', '$pagecontentdesctc')"; //echo $sql; mysql_query($sql); mysql_close($dbh);
header("Location: categoriesindextc.php?pid=$catid&msg=Add Product Successful"); ?>
|