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
28
29
30
31
32
33
34
35
36
37
|
<?php include 'config.php';
// Check if the user is logged in
if ((!isSet($_SESSION['loginname'])) || ($loggin <> '1')) { header("Location: login.php"); exit; } require("configure.php"); $ourservicesid = $_POST["ourservicesid"]; $ourservicestitleen = htmlspecialchars($_POST["ourservicestitleen"],ENT_QUOTES); $ourservicestitletc = htmlspecialchars($_POST["ourservicestitletc"],ENT_QUOTES); $ourservicestitlesc = htmlspecialchars($_POST["ourservicestitlesc"],ENT_QUOTES); $ourservicescontenten = preg_replace("/'/","\'",$_POST["ourservicescontenten"]); $ourservicescontenttc = preg_replace("/'/","\'",$_POST["ourservicescontenttc"]); $ourservicescontentsc = preg_replace("/'/","\'",$_POST["ourservicescontentsc"]); $nowdate = date("Y-m-d H:i:s"); //print_r($_POST);
// Modify $sql = "update ourservices set ourservicestitleen='$ourservicestitleen', ourservicestitletc='$ourservicestitletc', ourservicestitlesc='$ourservicestitlesc', ourservicescontenten='$ourservicescontenten', ourservicescontenttc='$ourservicescontenttc', ourservicescontentsc='$ourservicescontentsc', modifyday='$nowdate', cmsloginid='".$_SESSION['cmsloginid']."' "; $sql .= " where ourservicesid=". $ourservicesid ." "; mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'Modify About Us Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; }
mysql_close($dbh);
header("Location: ourservices_modifyform.php?msg=Modify Successful"); ?>
|