Following is the code:
class Db{
    protected static $connection;
    public function connect(){
        if (!isset(self::$connection)) {
            $config = parse_ini_file('../config.ini');
            self::$connection = new mysqli('localhost',$config['username'],$config['password'],$config['dbname']);
        }
        if (self::$connection === false) {
            die("Error in database connection. Please contact network administrator.");
            return false;
        }
        return self::$connection;
    }
    public function quote($value){
        $connection = $this -> connect();
        return "'".$connection -> real_escape_string(string $value)."'";
    }
}
I am getting the following error in the quote function: Parse error: syntax error, unexpected '$value' (T_VARIABLE) in D:\xampp\htdocs\fizzy\submit.php on line 48
 
     
     
     
    