PHP Help
Iamazn Offline
Junior Member
**
Posts: 9
Joined: Jul 2010
Post: #1
PHP Help
-Trying to retrieve user info via their last visit IP.
-This PHP script is not in myforum.net/forum/, it's in subdomain.myforum.net.
Why isn't anything "echoed"?

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
error_reporting(E_ALL); 
define('IN_MYBB', 1); 
require_once '/home/vol4/byethost11.com/username/myforum.net/htdocs/forum/global.php'; 

//Get the IP of the user.
$ip = $_SERVER['REMOTE_ADDR'];

$query = $db->query("SELECT username,postnum,usergroup,additionalgroups,lastip FROM mybb_users WHERE lastip='$ip'");
$user = $db->fetch_array($query);
if($user['username'] == NULL)
{
die("Invalid User");
}

$username = $user['username'];
$posts = $user['postnum'];
$usergroup = $user['usergroup'];
$additional = $user['additionalgroups'];

echo $username . "<br>";
echo $posts . "<br>";
echo $usergroup . "<br>";
echo $additional . "<br>";
?>

12-05-2010 12:18 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
PHP Help - Iamazn - 12-05-2010 12:18 PM
RE: PHP Help - ZiNgA BuRgA - 12-05-2010, 01:35 PM
RE: PHP Help - Iamazn - 12-05-2010, 03:00 PM
RE: PHP Help - ZiNgA BuRgA - 12-05-2010, 03:40 PM
RE: PHP Help - Iamazn - 12-05-2010, 03:53 PM
RE: PHP Help - ZiNgA BuRgA - 12-05-2010, 05:34 PM
RE: PHP Help - MattR - 12-05-2010, 10:35 PM
RE: PHP Help - Iamazn - 12-06-2010, 03:16 AM
RE: PHP Help - MattR - 12-06-2010, 05:36 AM
RE: PHP Help - Iamazn - 12-06-2010, 02:18 PM
RE: PHP Help - ZiNgA BuRgA - 12-06-2010, 03:28 PM
RE: PHP Help - Iamazn - 12-08-2010, 12:50 PM
RE: PHP Help - ZiNgA BuRgA - 12-08-2010, 02:27 PM

 Standard Tools
Forum Jump: