Jessica Posted March 9, 2007 Share Posted March 9, 2007 function send(){ $time = time(); $sql = "INSERT INTO mail(from, userTo, subject, message, sent) VALUES($this->from, $this->$to, '$this->subject', '$this->message', $time)"; return dbExecute($sql); } Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING on line 57 57 is the $sql = line. What am I missing? Link to comment https://forums.phpfreaks.com/topic/42023-parse-error/ Share on other sites More sharing options...
per1os Posted March 9, 2007 Share Posted March 9, 2007 <?php function send(){ $time = time(); $sql = "INSERT INTO mail(from, userTo, subject, message, sent) VALUES($this->from, $this->to, '$this->subject', '$this->message', $time)"; return dbExecute($sql); } ?> Try that maybe that should work. Replace $this->$to with $this->to --FrosT Link to comment https://forums.phpfreaks.com/topic/42023-parse-error/#findComment-203773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.