/var/www/globavet.com/webadmin/services_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
35
36
<?php 
require 'check_login.php';
if (
$logged_in <> 1) {
    
header('Location: login.php');
    return;
}
else
{
require(
"configure.php");
 
$servicesid        $_POST["servicesid"];
$pid            $_POST["pid"];
$title_en        htmlspecialchars($_POST["title_en"],ENT_QUOTES);
$title_tc        htmlspecialchars($_POST["title_tc"],ENT_QUOTES);
$desc_en        preg_replace("/'/","\'",$_POST["desc_en"]);
$desc_tc        preg_replace("/'/","\'",$_POST["desc_tc"]);

//print_r($_POST);

// Modify 
$sql "update services set title_en='$title_en', title_tc='$title_tc', desc_en='$desc_en', desc_tc='$desc_tc' ";
$sql .= " where servicesid="$servicesid ." ";
//echo $sql;
mysql_query($sql);

if( 
mysql_errno() > ){
    echo 
'Modify Our Services Error:<br />'mysql_error() .'<br />SQL: '$sql;
    exit;
}

    
mysql_close($dbh);

header("Location: services_index.php?pid=$pid&msg=Modify Successful");
}
?>