Can some1 tell me whats wrong?

Started by alexandervba, July 21, 2010, 07:24:59 AM

Previous topic - Next topic

alexandervba

A while ago some1 created this script for me in php, its pretty easy probably. But since i changed servers it stopped working, the passwords and stuff are correct.

<?php
$groups
= array(1, 2, 11, 8, 16, 13, 29, 21, 23, 5, 24, 15, 14, 10, 12, 7); // CHANGE THIS TO SUIT THE GROUPS YOU WANT TO SEE

/* include("SSI.php");
if( !$context['is_admin'] || !$context['can_mod'] ) {
 die('Sorry, not enough permission.');
} */

$DatabaseHost = "localhost";
$DatabaseUser = "xxxxxxxxxxxxx";
$DatabasePassword = "xxxxxxxxxxxxxxxxx";
$Database = "xxxxxxxxxxxxxx";
$DatabasePointer = mysql_connect($DatabaseHost, $DatabaseUser, $DatabasePassword);

mysql_select_db($Database, $DatabasePointer);

$data = array();

$sql = "SELECT ID_MEMBER, memberName, realName, groupName FROM smf_members INNER JOIN smf_membergroups USING ( ID_GROUP ) WHERE smf_members.ID_GROUP IN (" . implode(', ', $groups) . ") ORDER BY ID_MEMBER";
$query = mysql_query($sql);
while(
$row = mysql_fetch_assoc($query)) {
 
$data[$row['ID_MEMBER']] = $row;
}
mysql_free_result($query);

$sql = "SELECT ID_MEMBER, variable, value FROM smf_themes WHERE variable IN ('irc-nick', 'Rsn') AND ID_MEMBER IN (" . implode(', ', array_keys($data)) . ")";
$query = mysql_query($sql);
while(
$row = mysql_fetch_assoc($query)) {
 
$data[$row['ID_MEMBER']][$row['variable']] = $row['value'];
}
mysql_free_result($query);

echo
'<table border="0" cellspacing="5">';
$order = array('ID_MEMBER', 'memberName', 'realName', 'groupName', 'Rsn', 'irc-nick');
$columnheadings = array(
 
'ID_MEMBER' => 'ID',
 
'memberName' => 'User name',
 
'realName' => 'Display name',
 
'groupName' => 'Member group',
 
'Rsn' => 'RSN',
 
'irc-nick' => 'IRC nick')
 ;

echo
'<tr align="left">';
foreach(
$columnheadings as $key => $value) {
 echo
'<th>', $value, '</th>';
}
echo
'</tr>';

foreach(
$data as $row) {
 echo
'<tr>';
 foreach(
$order as $column) {
   echo
'<td>' . (isset($row[$column]) ? $row[$column] : '') . '</td>';
 }
 echo
'</tr>';
}
echo
'</table>';
?>


I get this: http://www.foe-rs.com/forums/ircandrsncheck.php

diamondred123

has your database host changed from local host?

database username or password or database name might be wrong?

i can cleearly see you hidden them which is smart

was this a irc chat?
Thanks
Learner but knows a little

alexandervba

damn, yes ur right, sorry they changed the forum dbase name... Sorry for disturbing you.

Thx anyways.

Advertisement: