<?php define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.' . $phpEx); mysql_connect("localhost", "zingbats", "PWL - hidden") or die("Could not connect: " . mysql_error()); mysql_select_db(tycooneden_com); // // Start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // // End session management // //restock function // // $user_id = ( isset($HTTP_GET_VARS['user_id']) ) ? intval($HTTP_GET_VARS['user_id']) : 0; $sql = "SELECT FROM phpbb_users WHERE user_id = 1 LIMIT 0, 30"; $result = mysql_query($sql); while($r=mysql_fetch_array($result)) /this causes the loop to be ran until the query is empty*/ { $user_points = $r["user_points"]; $username = $r["username"]; print "welcome"; print $username; if ($userpoints != 5) { print "you do not have 5 points"; } else { print "you do have 5 points"; } print "foo OI is this thing on?"; } ?>
<?php define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.' . $phpEx); mysql_connect("localhost", "zingbats", "PWL - hidden") or die("Could not connect: " . mysql_error()); mysql_select_db(tycooneden_com); // // Start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // // End session management // //restock function //
//
$user_id = ( isset($HTTP_GET_VARS['user_id']) ) ? intval($HTTP_GET_VARS['user_id']) : 0;
$sql = "SELECT FROM phpbb_users WHERE user_id = 1 LIMIT 0, 30"; $result = mysql_query($sql); while($r=mysql_fetch_array($result)) /this causes the loop to be ran until the query is empty*/ {
phpbb_users
$user_points = $r["user_points"]; $username = $r["username"];
print "welcome"; print $username;
if ($userpoints != 5) { print "you do not have 5 points"; } else { print "you do have 5 points"; } print "foo OI is this thing on?"; } ?>
Can you see anything wrong with that script?
well do you have a problem with it?
yes, check http://www.tycooneden.com/forum/gateway.php Everything is blank!
i presume the query is returning no results - try echoing out the number of results to see if you're getting any, and if there's a problem with your sql