Skip to content
Permalink
0c7261ca3d
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
30 lines (25 sloc) 608 Bytes
<?php
include('db/db.php');
//Database connection selection
$db=new db();
$db->db_connect();
$db->db_select();
$time = $_POST['time'];
$date = $_POST['date'];
$chargeid = $_POST['chargeid'];
$ip=$_POST['ip'];
$timestamp=time();
$check=mysql_query("SELECT * from seatsession WHERE date='$date' AND time='$time' AND fk_charges_id='$chargeid' ");
if(mysql_num_rows($check)>0)
{
echo "blocked";
}
else
{
$query="INSERT INTO seatsession VALUES ('','$chargeid','$time','$date','$timestamp','$ip')";
if(!$result = mysql_query($query))
{
die('SQL ERROR : '.mysql_error());
}
}
?>