/var/www/(Del)therainbows.org.hk/webadmin/ttmmodify.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php require("configure.php"); ?>
<?
$ttmid        
$_POST["ttmid"];

$ttmtitleen    htmlspecialchars($_POST["ttmtitleen"],ENT_QUOTES);
$ttmtitletc    htmlspecialchars($_POST["ttmtitletc"],ENT_QUOTES);
$ttmtitlesc    htmlspecialchars($_POST["ttmtitlesc"],ENT_QUOTES);

$ttmdescen     preg_replace("/'/","\'",$_POST["ttmdescen"]);
$ttmdesctc     preg_replace("/'/","\'",$_POST["ttmdesctc"]);
$ttmdescsc     preg_replace("/'/","\'",$_POST["ttmdescsc"]);


$sql "update ttm set ttmid='$ttmid', ttmtitleen='$ttmtitleen', ttmdescen='$ttmdescen', ttmtitletc='$ttmtitletc', ttmdesctc='$ttmdesctc', ttmtitlesc='$ttmtitlesc', ttmdescsc='$ttmdescsc' ";
$sql .= " where ttmid="$ttmid ." ";
//echo $sql;
mysql_query($sql);
mysql_close($dbh);

header("Location: ttmindex.php?msg=Modify Successful");
?>