/var/www/c-c.com.hk/webadmin/mainmenu_modify.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
25
26
27
28
29
30
31
32
33
34
<?php
include 'config.php';

// Check if the user is logged in

if ((!isSet($_SESSION['loginname'])) || ($loggin <> '1'))
{
header("Location: login.php");
exit;
}
require(
"configure.php"); 

$mmid            $_POST["mmid"];
$mmtitleen        htmlspecialchars($_POST["mmtitleen"],ENT_QUOTES);
$seotitleen        htmlspecialchars($_POST["seotitleen"],ENT_QUOTES);
$seodescen        htmlspecialchars($_POST["seodescen"],ENT_QUOTES);
$seokeyen        htmlspecialchars($_POST["seokeyen"],ENT_QUOTES);
$nowdate             date("Y-m-d H:i:s");
//print_r($_POST); 



$sql "update mainmenu set mmtitleen='$mmtitleen', seotitleen='$seotitleen', seodescen='$seodescen', seokeyen='$seokeyen', modifyday='$nowdate', cmsloginid='".$_SESSION['cmsloginid']."' ";
$sql .= " where mmid="$mmid ." ";
if( 
mysql_errno() > ){
    echo 
'Modify Main Menu Error:<br />'mysql_error() .'<br />SQL: '$sql;
    exit;
}
mysql_query($sql);

mysql_close($dbh);

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