Simple Account Rankings

Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Code:
<?php
// Connection parameters
$sqlserver = "1";
$username = "1";
$password = "1";

session_start();



// Make connection
$conn = odbc_connect($sqlserver, $username, $password);
// Execute query
$sql = "SELECT Rank FROM TB_USER WHERE strAccountID = '".$_SESSION['sesuser']."'";
$myrank = odbc_exec($conn,$sql);

// Display information

while ($row = odbc_fetch_array($myrank)){

if ($row == 1)
{
$rankacc = "Regular Member";
}

}

?>

when i include this to main.php,

and so a simple thing like echo $rankacc; it wont display anything. the code seems pretty alright to me.
 
woops fixed it already, hum strange i couldnt fix it 7 days ago lol.

anyway for teh leechers:


Code:
<?php





// Make connection
$conn = odbc_connect($sqlserver, $username, $password);
// Execute query
$sql = "SELECT Rank FROM TB_USER WHERE strAccountID = '".$_SESSION['sesuser']."'";
$myrank = odbc_exec($conn,$sql);

// Display information

while ($row = odbc_fetch_row($myrank)){

if ($row == 1)
{
$rankacc = "Regular Member";
}

}

?>
 
Last edited:
too quick with posting, it shows regular member regardless of row data,
if i add


Code:
if ($row == "2")
{
$rankacc = "Gold Member";
}

it shows goldmember while my row is still 1/NULL
 
woops fixed it already, hum strange i couldnt fix it 7 days ago lol.

anyway for teh leechers:


Code:
<?php
// Connection parameters
$sqlserver = "KN_online";
$username = "knight";
$password = "knight";




// Make connection
$conn = odbc_connect($sqlserver, $username, $password);
// Execute query
$sql = "SELECT Rank FROM TB_USER WHERE strAccountID = '".$_SESSION['sesuser']."'";
$myrank = odbc_exec($conn,$sql);

// Display information

while ($row = odbc_fetch_row($myrank)){

if ($row == 1)
{
$rankacc = "Regular Member";
}

}

?>
You posted your database password in there.
 
Last edited:
lol? i got it hex edited in all my exes..........
Only one, Ebenezer.

So hex it again?.. it isn't that hard..

This page has been cached, added to archives, and a bzillion people have already read it.
Anyone stupid enough to retain the same old password doesn't deserve to host a server at all...
 
Back