<?php session_start(); require_once 'Logic/BidLogic.php'; require_once 'Logic/ItemLogic.php'; $itemLogic = new ItemLogic(); $id = $_GET['itemId']; $item = $itemLogic->getItem($id); if ($_GET['newBid'] < $item->highestBid) { echo 'Your Bid Is Lesser Than Highest Bid.'; } else { $bidderId = $_SESSION['user']; $bidLogic = new BidLogic(); $Bid = new Bid(); $Bid->setItemId($_GET['itemId']); $Bid->setOwnerId($_GET['ownerId']); $Bid->setBidderId($bidderId); $Bid->setAmmount($_GET['newBid']); $ret = $bidLogic->transferAmmount($Bid); if ($ret == 1) { $bidLogic->addBid($Bid); echo "Your Bid Added"; require "fbmain.php"; if ($fbme) { echo "in"; try { $wallpostpage = $facebook->api('/me/feed', 'post', array('message' => 'Your bid of ' . $item->highestBid . '$ has been added on ' . $item->title . '. ', 'picture' => 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs1324.snc4/161996_166764056682774_6216247_q.jpg ', 'link' => 'http://www.facebook.com/apps/application.php?id=166764056682774', 'name' => 'eVeiling.com', 'cb' => '')); } catch (FacebookApiException $e) { print_r($o);