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

mysql_query("insert into categories (parentid, catnameen, catnametc, catnamesc, sortby) values ('$pid', '$catnameen', '$catnametc', '$catnamesc', $sortby)");
//echo mysql_query(); 
mysql_close($dbh);

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