/var/www/(Del)yuecreations.com.hk/webadmin/indexblog_modify.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php require("configure.php");
 
$IndexBlogId         $_POST["IndexBlogId"];
$IndexBlogTitleen    htmlspecialchars($_POST["IndexBlogTitleen"],ENT_QUOTES);
$IndexBlogDescen     preg_replace("/'/","\'",$_POST["IndexBlogDescen"]);
$IndexBlogTitletc    htmlspecialchars($_POST["IndexBlogTitletc"],ENT_QUOTES);
$IndexBlogDesctc     preg_replace("/'/","\'",$_POST["IndexBlogDesctc"]);
//print_r($_POST);

// Modify 
$sql "update IndexBlog set IndexBlogTitleen='$IndexBlogTitleen', IndexBlogDescen='$IndexBlogDescen', IndexBlogTitletc='$IndexBlogTitletc', IndexBlogDesctc='$IndexBlogDesctc' ";
$sql .= " where IndexBlogId="$IndexBlogId ." ";
mysql_query($sql);

if( 
mysql_errno() > ){
    echo 
'Blog Modify Error:<br />'mysql_error() .'<br />SQL: '$sql;
    exit;
}    
mysql_close($dbh);

header("Location: indexblog_modifyform.php?id="$IndexBlogId ."&msg=Modify Successful");
?>