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
|
<?php
include 'config.php'; // Check if the user is logged in if ((!isSet($_SESSION['loginname'])) || ($loggin <> '1')) { header("Location: login.php"); exit; }
$nowdate = date("Y-m-d H:i:s");
foreach ($arraylangcode as $langcode => $langname) {
$sql1 = "UPDATE site_info SET companyname_" . $langcode . "=?,enquiryemail=?, lastupby=?, lastupdate=? WHERE siteinfoid=? ";
$sth1 = $dbh->prepare($sql1);
if (!$sth1->execute(array($_POST['companyname_' . $langcode], $_POST['enquiryemail'], $_SESSION['loginid'], $nowdate, $_POST["siteinfoid"]))) throw new Exception('[' . $sth1->errorCode() . ']: ' . $sth1->errorInfo());
}
header("Location: site_info_modifyform.php?msg=Modify Successful"); ?>
|