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
|
<?php require 'check_login.php'; if ($logged_in <> 1) { header('Location: login.php'); return; } else { require("configure.php"); $aboutusid = $_POST["aboutusid"]; $pid = $_POST["pid"]; $title_en = htmlspecialchars($_POST["title_en"],ENT_QUOTES); $title_tc = htmlspecialchars($_POST["title_tc"],ENT_QUOTES); $desc_en = preg_replace("/'/","\'",$_POST["desc_en"]); $desc_tc = preg_replace("/'/","\'",$_POST["desc_tc"]);
//print_r($_POST);
// Modify $sql = "update aboutus set title_en='$title_en', title_tc='$title_tc', desc_en='$desc_en', desc_tc='$desc_tc' "; $sql .= " where aboutusid=". $aboutusid ." "; //echo $sql; mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'Modify About Us Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; }
mysql_close($dbh);
header("Location: aboutus_index.php?pid=$pid&msg=Modify Successful"); } ?>
|