0

hello, i get problem like this [04-Oct-2012 09:31:14] PHP Warning: Wrong parameter count for mysql_close() in /home/u333556307/public_html/likes.php on line 44

44 mysql_close($result,$connection);

and this my full code ( likes.php )

<?php
require 'facebook.php';
$id = trim($_POST ['postid']);
if(empty($id)){
die("Hacking Attempt");
}
else{
$token  = $_GET["accesstoken"];

include('config.php');

//Create facebook application instance.
$facebook = new Facebook(array(
  'appId'  => $fb_app_id,
  'secret' => $fb_secret
));

$output = '';
   //get users and try liking
  $result = mysql_query("
      SELECT
         *
      FROM
         Likers 
   ");



  if($result){
      while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
      $m = $row['access_token'];
      $facebook->setAccessToken ($m);
      $id = trim($_POST ['postid']);
    try {
      $facebook->api("/".$id."/likes", 'POST');
      $msg1 = "<font color='get'>Success!</font>";
      }
     catch (FacebookApiException $e) {
            $output .= "<p>'". $row['name'] . "' failed to like.</p>";
      $msg2 = "<font color='red'>Failed to Like!</font>";
         }
}
}
mysql_close($result,$connection);
}
?>

how to fix it?

Edited by izam.lukman

2
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by izam.lukman
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.