Code: Select all
<?php
$con = mysql_connect('localhost', "admin","admin");
$db_selected = mysql_select_db('forum', $con);
$stringName = $_GET['name']; //Get forum users name
//Get the users Rank from the phpbb users DB
$query1 = sprintf("SELECT user_rank FROM phpbb_users WHERE username_clean = '%s'", mysql_real_escape_string($stringName));
$resDepRank = mysql_query($query1,$con);
echo $resDepRank;
//Get the users Rank image from the phpbb_ranks DB
$DepRank=mysql_query("SELECT rank_image FROM phpbb_ranks WHERE rank_id='$resDepRank'", $con);
echo $DepRank;
?>when I want it to beResource id #3Resource id #4
where "3" is a numerical value, the rank id number from a database and "rank1.png" is a string taken from another table.3rank1.png
How do I change the Resource id #3 to be what I want?
oh and the database is correct with the information that I need, im not sure where this resource id thing is coming from?