OK I wrote this query but i keep on getting error on it:

$query2 = "INSERT INTO ATTENDANCE (Class,Time,T_User_Name,S_Number,Absent,Date) VALUES ('$Class','$S_Type','$_COOKIE[User]','$S_Number','1','$Date')";

the error i get from php logs is:
[28-Dec-2005 17:51:07] PHP Parse error: parse error, unexpected T_VARIABLE in /test/teachers/take.php on line 27
-------------------------
line 27 is the query

what i dont get is why its giving me this error because when i run the query in phpMyAdmin it works fine but not while using it in php code.

Don't worry i found out where the problem was it was way up in the program where i over looked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.