I have absolutly no idea how this parse error is comming up.
This script is for sales records at the tavern that I work at.
The parse error always occurs at the last line no matter what the line is.
Here is the code so far.
<?php
$username = "raat";
$database = "harmartavern";
$wd = $POST["weekday"];
$m = $POST["month"];
$d = $POST["day"];
$y = $POST["year"];
$tdi = $POST["tavern_dine_in"];
$tco = $POST["tavern_carry_out"];
$stt = $_POST["sales_tax_tavern"];
$pdi = $POST["patio_dine_in"];
$pco = $POST["patio_carry_out"];
$stp = $_POST["sales_tax_patio"];
$oios = $POST["other_income_or_sales"];
$ot = $POST["other_tax"];
$cfpd = $POST["cash_from_previous_day"];
$ls = $POST["lottery_sales"];
$lpo = $POST["lottery_paid_out"];
$opo = $POST["other_pay_outs"];
$cc = $POST["credit_cards"];
$o = $POST["over"];
$s = $_POST["short"];
{
mysql_connect("localhost",$username,"raater");
@mysql_select_db($database) or die( "Unable to select database");
$table = date('YdmHis');
$tn = "$table";
$createtable="CREATE TABLE $tn (id int(6) NOT NULL auto_increment,
wd varchar(30) NOT NULL,
m varchar (30) NOT NULL,
d varchar(30) NOT NULL,
y varchar(30) NOT NULL,
tdi varchar(30) NOT NULL,
tco varchar(30) NOT NULL,
stt varchar(30) NOT NULL,
pdi varchar(30) NOT NULL,
pco varchar(30) NOT NULL,
stp varchar(30) NOT NULL,
oios varchar(30) NOT NULL,
ot varchar(30) NOT NULL,
cfpd varchar(30) NOT NULL,
ls varchar(30) NOT NULL,
lpo varchar(30) NOT NULL,
opo varchar(30) NOT NULL,
cc varchar(30) NOT NULL,
o varchar(30) NOT NULL,
s varchar(30) NOT NULL,
PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
$insert = "INSERT INTO $tn VALUES
('$wd',
'$m',
'$d',
'$y',
'$tdi',
'$tco',
'$stt',
'$pdi',
'$pco',
'$stp',
'$oios',
'$ot',
'$cfpd',
'$ls',
'$lpo',
'$opo',
'$cc',
'$o',
'$s')";
mysql_query($createtable);
mysql_close();
mysql_query($insert);
mysql_close();
?>
The Last Line is where I get the parse error.
Let me know if you can help.
-Donald