1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php require("configure.php"); ?> <? $abouttitleen = htmlspecialchars($_POST["abouttitleen"],ENT_QUOTES); $aboutdescen = preg_replace("/'/","\'",$_POST["aboutdescen"]); $abouttitletc = htmlspecialchars($_POST["abouttitletc"],ENT_QUOTES); $aboutdesctc = preg_replace("/'/","\'",$_POST["aboutdesctc"]); $i_pref = $_POST["orderno"];
//print_r($_POST);
$sql = "select max(aboutid) as maxid "; $sql .= "from about "; $result=mysql_query($sql); $row = mysql_fetch_array($result,MYSQL_ASSOC); $aboutid = $row{maxid}+1;
mysql_query("insert into about (aboutid, abouttitleen, aboutdescen, abouttitletc, aboutdesctc, pref) values ('$aboutid', '$abouttitleen', '$aboutdescen', '$abouttitletc', '$aboutdesctc', $i_pref)"); mysql_close($dbh);
header("Location: aboutindex.php?msg=Update Successful"); ?>
|