public function add(Contribution $contribution) { $name = $contribution->getName(); $email = $contribution->getEmail(); $poiName = $contribution->getPoiName(); $poiAddress = $contribution->getPoiAddress(); $poiCategory = $contribution->getPoiCategory(); $poiMessage = $contribution->getPoiMessage(); $poiRequest = $contribution->getPoiRequest(); date_default_timezone_set('Asia/Kathmandu'); $date = date('Y-m-d H:i:s'); $SQL = "INSERT INTO " . $this->TABLE_NAME . " (name,email,poiName,poiAddress,poiCategory,poiMessage,poiRequest,date)\n VALUES ('{$name}','{$email}','{$poiName}','{$poiAddress}','{$poiCategory}','{$poiMessage}','{$poiRequest}','{$date}')"; if ($result = mysql_query($SQL, $this->connection)) { return mysql_insert_id($this->connection); } else { return false; } }