1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?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"]); $IndexBlogTitlesc = htmlspecialchars($_POST["IndexBlogTitlesc"],ENT_QUOTES); $IndexBlogDescsc = preg_replace("/'/","\'",$_POST["IndexBlogDescsc"]); //print_r($_POST);
// Modify $sql = "update IndexBlog set IndexBlogTitleen='$IndexBlogTitleen', IndexBlogDescen='$IndexBlogDescen', IndexBlogTitletc='$IndexBlogTitletc', IndexBlogDesctc='$IndexBlogDesctc', IndexBlogTitlesc='$IndexBlogTitlesc', IndexBlogDescsc='$IndexBlogDescsc' "; $sql .= " where IndexBlogId=". $IndexBlogId ." "; mysql_query($sql);
if( mysql_errno() > 0 ){ echo 'Blog Modify Error:<br />'. mysql_error() .'<br />SQL: '. $sql; exit; } mysql_close($dbh);
header("Location: indexblog_modifyform.php?id=". $IndexBlogId ."&msg=Modify Successful"); ?>
|