/var/www/awintours.com/webadmin/news_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");
 
$newsid         $_POST["newsid"];
$newstitle        htmlspecialchars($_POST["newstitle"],ENT_QUOTES);
//$newsdesc         = $_POST["newsdesc"];
$newsdesc    preg_replace("/'/","\'",$_POST["newsdesc"]);
//print_r($_POST); 

// Modify 
$sql "update news set newstitle='$newstitle', newsdesc='$newsdesc' ";
$sql .= " where newsid="$newsid ." ";
mysql_query($sql);

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

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