syntax error help please

i’m not good on php but i need some help here !
it show on browser :
Parse error: syntax error, unexpected T_VARIABLE, expecting ‘;’ or ‘{’ in /hermes/bosweb/web208/b2083/ipg.pl47com4/fb/inc/Gift.php on line 25

i think i do some mistakes not just on 25 line there some more mistakes
please any pro php can help me !
i make this page by copy past and some codes !

[php]<?php

/*

Facebook Gift Store Application

Version: 1.2

Created By: Shyamal Borsaikia

Copyright © 2011 Shyamal Borsaikia

Email: [email protected]

Created: 5/1/2011

*/

// class definition

class Gift {
// define properties
public $gid;
public function __construct()
$this->gid = null
$this->fields = array( ‘title’ => ‘’,
‘image’ => ‘’,
‘price’ => 0,
‘category_title’ => ‘’);
}

// return an object populated based on the record's user id
public static function getById($gift_id) {

	$gift = new Gift();

	$row = mysql_fetch_assoc($res);

	$gift->gid = $gift_id;
	$gift->image = $row[gImage];
	$gift->price = $row[gPrice];
	$gift->hit = $row[gHit];
	$gift->category = $row[gCat];

	$rs = query("SELECT * FROM `gifts_category` WHERE `catid`=$row[gCat]");
	$rw = mysql_fetch_assoc($rs);

	$gift->category_title = $rw[catTitle];

	mysql_free_result($res);
	return $gift;
}

// save the record to the database
public function save() {

			`gTitle`=\"$this->title\",
			`gImage`=\"$this->image\",
			`gPrice`=$this->price,
			`gHit`=$this->hit,
			`gCat`=$this->category
			 	WHERE `gid`=$this->gid");
	}

?>[/php]

please help !

Hi there,

This line at the beginning of the first public function needs a semicolon at the end:
[php]$this->gid = null
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service