<?
session_start();
if($status!="on")  header("Location: ./login.php");

$user="cp037684_tbadm";
$password="siamnovaTho1220!";
$database="cp037684_tbadm";

mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");


$query = "UPDATE goldprice   SET  `date`='$date', `time`='$h1:$m1:00', `b96sb`=$b96sb, `b96bb`=$b96bb, `o96bg`=$o96bg, `o96sb`=$o96sb, `o96bb`=$o96bb  WHERE `ID`=$id ";

//echo "UPDATE `siamnovaTho1220!_`.`goldprice`   SET  `date`='$date', `time`='$h1:$m1:00', `b96sb`=$b96sb, `b96bb`=$b96bb, `o96bg`=$o96bg, `o96sb`=$o96sb, `o96bb`=$o96bb  WHERE `ID`=$id ";
//$query = "UPDATE `siamnovaTho1220!_`.`goldprice` SET `time`='09:59:00' WHERE `ID`=2018";

mysql_query($query);

$query = "INSERT INTO log SET userid='$uid',action='2' ";
mysql_query($query);		

mysql_close();
header('Location: ./form2.php');
?>
