Jump to content

Parse error: syntax error, unexpected T_VAR in


RVCom

Recommended Posts

Hi

 

when i visit my site (just uploaded) i got the next error:

 

Parse error: syntax error, unexpected T_VAR in /home/rvcom/public_html/boddies1/include/db.inc.php on line 198

 

but i cannot find any failures in the db_inc.php file.. please help!

 

This is line 198:

 

  var $database ='rvcom_boddies1';

        return (@mysql_fetch_assoc($this->result));

 

 

<?php

 

 

 

class DB

 

{

 

    // Connection parameters

 

 

 

var $host = 'localhost';

 

    var $user ="rvcom_boddies";

 

    var $password ="xxx";

 

    var $persistent = false;

 

var $adminid='xxx';

 

var $adminipwd='xxx';

 

 

 

 

 

 

 

 

 

// Database connection handle

 

    var $conn = NULL;

 

 

 

    // Query result

 

    var $result = false;

 

 

 

//    function DB($host, $user, $password, $database, $persistent = false)

 

    function DB()

 

    {

 

 

 

}

 

 

 

    function open()

 

    {

 

        // Choose the appropriate connect function

 

        if ($this->persistent) {

 

            $func = 'mysql_pconnect';

 

        } else {

 

            $func = 'mysql_connect';

 

        }

 

 

 

        // Connect to the MySQL server

 

        $this->conn = $func($this->host, $this->user, $this->password);

 

        if (!$this->conn) {

 

            return false;

 

        }

 

 

 

        // Select the requested database

 

        if (!@mysql_select_db($this->database, $this->conn)) {

 

            return false;

 

        }

 

 

 

        return true;

 

    }

 

 

 

 

 

    function close()

 

    {

 

        return (@mysql_close($this->conn));

 

    }

 

 

 

    function error()

 

    {

 

        return (mysql_error());

 

    }

 

 

 

    function query($sql = '')

 

    {

 

        $this->result = @mysql_query($sql, $this->conn);

 

return ($this->result != false);

 

    }

 

 

 

    function affectedRows()

 

    {

 

        return (@mysql_affected_rows($this->conn));

 

    }

 

 

 

    function numRows()

 

    {

 

        return (@mysql_num_rows($this->result));

 

    }

 

function fieldName($field)

 

    {

 

      return (@mysql_field_name($this->result,$field));

 

    }

 

function insertID()

 

    {

 

        return (@mysql_insert_id($this->conn));

 

    }

 

 

 

    function fetchObject()

 

    {

 

        return (@mysql_fetch_object($this->result, MYSQL_ASSOC));

 

    }

 

 

 

    function fetchArray()

 

    {

 

        return (@mysql_fetch_array($this->result, MYSQL_NUM));

 

    }

 

 

 

    function fetchAssoc()

 

    {

 

 

    var $database ='rvcom_boddies1';

        return (@mysql_fetch_assoc($this->result));

 

    }

 

 

 

    function freeResult()

 

    {

 

        return (@mysql_free_result($this->result));

 

    }

 

}

 

define('BASEURL','http://www.rvcom.org/boddies1');

 

/*

 

define('BASEURLCSSNEW','http://static.css.influxive.info/greenfairnew');

 

define('BASEURLICONS','http://wcons.df.influxive.info/greenfairnew');

 

define('BASEURLHOWITWORKS','http://oi.how.it.influxive.info/greenfairnew');

 

define('BASEURLTEMPLATEIMAGE','http://ti.ak.img.influxive.info/greenfairnew');

 

define('BASEURLMEDIA','http://media.fr.influxive.info/greenfairnew');

 

define('BASEURLMEDIAIMAGES','http://img.zs.ch.influxive.info/greenfairnew');

 

*/

 

 

 

define('BASEURLCSSNEW','http://www.rvcom.org/boddies1/div2');

 

define('BASEURLICONS','http://www.rvcom.org/boddies1/div2');

 

define('BASEURLHOWITWORKS','http://www.rvcom.org/boddies1/div2');

 

define('BASEURLTEMPLATEIMAGE','http://www.rvcom.org/boddies1/div2');

 

define('BASEURLMEDIA','http://www.rvcom.org/boddies1/div2');

 

define('BASEURLMEDIAIMAGES','http://www.rvcom.org/boddies1/div2');

 

 

 

define('BASEPATH','/home/rvcom/public_html');

 

define('IMAGESURL',BASEURL.'/images');

 

define('IMAGESPATH',BASEPATH.'/images');

 

define('IMAGESURLM',BASEURL.'notesimages');

 

define('IMAGESPATHM',BASEPATH.'notesimages');

 

define('ADMIN_MAIL','richard@rvcom.nl');

 

define('TITLE','Boddies | ');

 

define('TITLE1','Boddies ');

 

$accepted_upload_extensions_pics = array('gif','jpg','jpeg','png');

 

 

 

function get_uname($uid){

 

$sql="select * from user where id='$uid'";

 

$myrwd=mysql_query($sql);

 

$myuname=mysql_fetch_array($myrwd);

 

$uname=$myuname['uname'];

 

return $uname;

 

}

 

 

 

 

 

?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.