Jump to content

Search the Community

Showing results for tags 'php facebook'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. This is the error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a2121694/public_html/cbox/fb_lib/connect.php on line 16 <?php require './fb_connect.php'; include('../config.php'); $fb = new fbConnect(); if(!$fb->output) { header("Location:".$fb->getLoginUrl()); } else { $userInfo = $fb->getUserInfo(); $_SESSION['ses_id'] = md5(microtime()); $user = mysql_query("SELECT * FROM `".DB_PREFIX."user_accounts` WHERE `fbid`='".$userInfo['id']."'"); $buid = $userInfo['id']; if(mysql_num_rows($user)>0) { $userdata = mysql_fetch_assoc($user); if($userdata['last_request_time']<=(time()-10800)) { mysql_query("INSERT INTO `".DB_PREFIX."chats` VALUES('','Hello ! Welcome back to ".GLOBAL_NAME.", <b> ".$userdata['fbname']." </b><img src=\'http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/6.gif\'> You\'re Back! <br/><a href=\'http://www.barkadafm.net/view.php?link=http://www.txtmyt.com\' target=\'_blank\'><img src=\'http://bfm.chatmode.info/images/txtmyt.png\' width=\'480px\' alt=\'Free Unlimited Text to All Networks @ TXTMYT.COM\'/></a>','164790013558517','normal','".time()."')"); } mysql_query("UPDATE `".DB_PREFIX."user_accounts` SET `gender` = '".$userInfo['gender']."', `ses_id` = '".$_SESSION['ses_id']."', `active` = '1', `sign_time` = CURRENT_TIMESTAMP, `last_request_time` = '".time()."', `ip_address` = '".$_SERVER['REMOTE_ADDR']."' WHERE `fbid`='".$userInfo['id']."'"); } else { mysql_query("INSERT INTO `".DB_PREFIX."user_accounts` VALUES('', '".$userInfo['id']."', '".$userInfo['name']."', '".$userInfo['gender']."', '0', '".$_SESSION['ses_id']."', '1', CURRENT_TIMESTAMP, '".time()."', '".$_SERVER['REMOTE_ADDR']."','0','0')"); mysql_query("INSERT INTO `".DB_PREFIX."chats` VALUES('','Lets all Welcome,<b> ".$userInfo['name']." </b> Welcome sa BarkadaFM! <img src=\'http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/6.gif\'><br/><a href=\'http://www.barkadafm.net/view.php?link=http://www.txtmyt.com\' target=\'_blank\'><img src=\'http://bfm.chatmode.info/images/txtmyt.png\' width=\'480px\' alt=\'Free Unlimited Text to All Networks @ TXTMYT.COM\'/></a>','164790013558517','normal','".time()."')"); } if(isset($_SESSION['ses_id'])) { $getUserInfo = mysql_query("SELECT * FROM `".DB_PREFIX."user_accounts` WHERE `ses_id`='".$_SESSION['ses_id']."'"); if(mysql_num_rows($getUserInfo)>0) { while($data=mysql_fetch_assoc($getUserInfo)) { $_SESSION['fbid'] = $data['fbid']; $_SESSION['name'] = $data['fbname']; $_SESSION['gender'] = $data['gender']; $_SESSION['acctype'] = $data['acctype']; } } else { die("Invalid Session ID"); } ?> <script> window.opener.location.href="../index.php"; self.close(); </script> <?php } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.