/var/www/(Del)asld.org.hk/webadmin/pubedumodify.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");

    if (!isset(
$_SESSION["cmslogin"])) {
        
header("Location: login.php");
        exit;
    }

    
$pubid    $_POST["pubid"];
    
$publink  htmlspecialchars($_POST["publink"], ENT_QUOTES);
    
$pubtitle htmlspecialchars($_POST["pubtitle"], ENT_QUOTES);
    
$pubdate  htmlspecialchars($_POST["pubdate"], ENT_QUOTES);


    
$sql "update pub set publink='$publink', pubtitle='$pubtitle', pubdate='$pubdate' ";
    
$sql .= "where pubid=" $pubid " ";

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

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