Link Posted July 24, 2008 Share Posted July 24, 2008 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/html/includes/classes/JournalJuly.class.php on line 57 I can't find it. Can you? <?php require_once $_SERVER['DOCUMENT_ROOT']."/includes/config.inc.php"; require_once $_SERVER['DOCUMENT_ROOT']."/includes/db.inc.php"; require_once $_SERVER['DOCUMENT_ROOT']."/includes/classes/Journal.class.php"; require_once $_SERVER['DOCUMENT_ROOT']."/includes/classes/User.class.php"; $user = new User(); class JournalJuly extends Journal { public function JournalJuly() { parent::setMonth("july"); } public function exists($id) { global $_CONFIG; dbConnect(); $q = "SELECT * FROM ".$_CONFIG['journal_july_database_table']." WHERE user_id=".checkQuery($id); if (mysql_num_rows(mysql_query($q)) == 1) return true; else return false; } public function setJournal($id, $arr) { global $_CONFIG; if ($this->exists($id)) { $q = "UPDATE ".$_CONFIG['journal_july_database_table']." SET supervisor=".checkQuery($arr['supervisor']).", team=".checkQuery($arr['team']).", teammembers=".checkQuery($arr['teammembers']).", teamrole=".checkQuery($arr['teamrole']).", leader=".checkQuery($arr['leader']).", oral=".checkQuery($arr['oral']).", written=".checkQuery($arr['written']).", others=".checkQuery($arr['others']).", dilemma=".checkQuery($arr['dilemma']).", policy=".checkQuery($arr['policy']).", action=".checkQuery($arr['action']).", timestamp=".checkQuery(time())." WHERE user_id=".checkQuery($id); } else { $q = "INSERT INTO ".$_CONFIG['journal_july_database_table']." SET user_id=".checkQuery($id).", supervisor=".checkQuery($arr['supervisor']).", team=".checkQuery($arr['team']).", teammembers=".checkQuery($arr['teammembers']).", teamrole=".checkQuery($arr['teamrole']).", leader=".checkQuery($arr['leader']).", oral=".checkQuery($arr['oral']).", written=".checkQuery($arr['written']).", others=".checkQuery($arr['others']).", dilemma=".checkQuery($arr['dilemma']).", policy=".checkQuery($arr['policy']).", action=".checkQuery($arr['action']).", timestamp=".checkQuery(time()); } $user = new User(); if ($user->studentInfoExists($id)) { $q2 = "UPDATE ".$_CONFIG['student_info_database_table']." SET company_name=".checkQuery($arr['company_name'])", supervisor_name=".checkQuery($arr['supervisor_name'])", project_description=".checkQuery($arr['project_description'])." WHERE user_id=".checkQuery($id); } else { $q2 = "UPDATE ".$_CONFIG['student_info_database_table']." SET company_name=".checkQuery($arr['company_name'])", supervisor_name=".checkQuery($arr['supervisor_name'])", project_description=".checkQuery($arr['project_description']).", user_id=".checkQuery($id); } if (mysql_query($q) && mysql_query($q2)) return true; else return false; } function getJournal($id) { global $_CONFIG; $q = "SELECT * FROM ".$_CONFIG['journal_july_database_table']." WHERE user_id=".checkQuery($id); if ($info = mysql_fetch_array(mysql_query($q))) { $user = new User(); $student = $user->getStudentInfo($id); foreach ($student as $key=>$val) $info[$key] = $val; return $info; } else return false; } } ?> Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/ Share on other sites More sharing options...
DarkWater Posted July 24, 2008 Share Posted July 24, 2008 What's line 57? Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/#findComment-598622 Share on other sites More sharing options...
revraz Posted July 24, 2008 Share Posted July 24, 2008 Forgot a end quote timestamp=".checkQuery(time()); Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/#findComment-598623 Share on other sites More sharing options...
Jabop Posted July 24, 2008 Share Posted July 24, 2008 <?php if ($user->studentInfoExists($id)) { $q2 = "UPDATE ".$_CONFIG['student_info_database_table']." SET company_name=".checkQuery($arr['company_name']).", supervisor_name=".checkQuery($arr['supervisor_name']).", project_description=".checkQuery($arr['project_description'])." WHERE user_id=".checkQuery($id); } else { $q2 = "UPDATE ".$_CONFIG['student_info_database_table']." SET company_name=".checkQuery($arr['company_name']).", supervisor_name=".checkQuery($arr['supervisor_name']).", project_description=".checkQuery($arr['project_description']).", user_id=".checkQuery($id); } ?> Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/#findComment-598624 Share on other sites More sharing options...
Link Posted July 24, 2008 Author Share Posted July 24, 2008 Thanks Jabop, just found it too. I never think to look after the line! Awesome! Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/#findComment-598627 Share on other sites More sharing options...
DarkWater Posted July 24, 2008 Share Posted July 24, 2008 Forgot a end quote timestamp=".checkQuery(time()); The error is actually on line 63 of the code he posted. =) I ran it through php -l. Link to comment https://forums.phpfreaks.com/topic/116412-solved-t_constant_escaped_string/#findComment-598629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.