/var/www/(Del)therainbows.org.hk/webadmin/categoriesmodify.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
<?php
//require 'db_connect.php';
require 'check_login.php';
if (
$logged_in <> 1) {
    
header('Location: login.php');
    return;
}
else
{
?>
<?php 
require("configure.php"); ?>
<?
$catid            
$_POST["catid"];
$catnameen        htmlspecialchars($_POST["catnameen"],ENT_QUOTES);
$catnametc        htmlspecialchars($_POST["catnametc"],ENT_QUOTES);
$catnamesc        htmlspecialchars($_POST["catnamesc"],ENT_QUOTES);
$sortby            $_POST["sortby"];


$sql "update categories set catid='$catid', catnameen='$catnameen', catnametc='$catnametc', catnamesc='$catnamesc', sortby='$sortby' ";
$sql .= " where catid="$catid ." ";
mysql_query($sql);
mysql_close($dbh);

header("Location: categoriesindex.php?pid=$catid&msg=Update Successful");
?>
<?php
}
?>