Coding Blues - Parse Error

From: Date: Thu, 16 Sep 2004 03:19:07 +0000
Subject: Coding Blues - Parse Error
Groups: php.general 
Request: Send a blank email to php-general+get-196812@lists.php.net to get a copy of this message
Hello. I am writing some code, but though everything seems ok, I get the same error: "parse error, unexpected T_VARIABLE on line 23" . Here is the code: <? Class fl_SQL { var $server; var $user; var $pass; var $connection; var $db; var $query; var $record; var $tlist; } Function fl_SQL($server, $user, $pass, $db = NULL) { $this->server = $server; $this->user = $user; $this->pass = $pass; $this->db = $db; } Function doconnect($db = $this->db){ $this->db = $db $this->connection = mysql_connect($this->server, $this->user, $this->pass); if (!$this->connect) die ("Could not connect to server!"); mysql_select_db($this->db,$this->connection) or die ("Could not connect to database!"); } Function doquery($query, $db = $this->db){ $this->db = $db $this->connect($this->db); $this->query = $query mysql_query($this->query,$this->connect) } } ?> Can anyone please help me? Thanking you in anticipation, Yusuf

« previous php.general (#196812) next »