| | |
Query Error
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
OK I wrote this query but i keep on getting error on it:
[PHP]$query2 = "INSERT INTO ATTENDANCE (Class,Time,T_User_Name,S_Number,Absent,Date) VALUES ('$Class','$S_Type','$_COOKIE[User]','$S_Number','1','$Date')"; [/PHP]
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.
[PHP]$query2 = "INSERT INTO ATTENDANCE (Class,Time,T_User_Name,S_Number,Absent,Date) VALUES ('$Class','$S_Type','$_COOKIE[User]','$S_Number','1','$Date')"; [/PHP]
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.
![]() |
Similar Threads
- Junior Developer have some doubts in CF_SQL_NUMERIC (ColdFusion)
- There appears to be an error with the database. (MySQL)
- Using PHP to connect to remote MSSQL database (PHP)
- passing variables threw query (MySQL)
- Please Help: Unknown column (PHP)
- php mysql help (PHP)
- Invision Power Board mysql error when trying to view newly created forums (PHP)
- "preg_match" For What purpose this command use? (PHP)
- Problem with foreach when using linking (PHP)
Other Threads in the PHP Forum
- Previous Thread: phpbb admin panel add ons
- Next Thread: Image Resize Function Error
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





