/var/www/(Del)pathways.org.hk/admin/newsmodify.php


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"); ?>
<?
$newsid                
$_POST["newsid"];
$newsdate            htmlspecialchars($_POST["newsdate"],ENT_QUOTES);
$status                $_POST["status"];

$newstitle            htmlspecialchars($_POST["newstitle"],ENT_QUOTES);
$newsdesc             preg_replace("/'/","\'",$_POST["newsdesc"]);
$newstitletc        htmlspecialchars($_POST["newstitletc"],ENT_QUOTES);
$newsdesctc             preg_replace("/'/","\'",$_POST["newsdesctc"]);

$newstitlecover            htmlspecialchars($_POST["newstitlecover"],ENT_QUOTES);
$newsdesccover            htmlspecialchars($_POST["newsdesccover"],ENT_QUOTES);
$newstitletccover        htmlspecialchars($_POST["newstitletccover"],ENT_QUOTES);
$newsdesctccover        htmlspecialchars($_POST["newsdesctccover"],ENT_QUOTES);

$sql "update news set newsid='$newsid', newstitle='$newstitle', newsdesc='$newsdesc', newsdate='$newsdate', status='$status', newstitletc='$newstitletc', newsdesctc='$newsdesctc', newstitlecover='$newstitlecover', newsdesccover='$newsdesccover', newstitletccover='$newstitletccover', newsdesctccover='$newsdesctccover' ";
$sql .= "where newsid="$newsid ." ";

mysql_query($sql);
mysql_close($dbh);

header("Location: newsindex.php?msg=Update Successful");
?>