[PHP]Help me with get account data
#3

That is not where the problem comes from. the problem is coming from:
PHP код:
global $mysql// we are going to use mysql right? :P 
if (isset($_GET['Name'])) {  
      
$page  mysqli_escape_string($mysql, (int)$_GET['Name']); // let's make sure that we just get the integer and not a attempt to do sql injection 
        
$query mysqli_query($mysql"SELECT * FROM `Users` WHERE `Name` = {$page}"); 
        if(!
mysqli_num_rows($query)) { // if the club requested does not exists... 
            
header("Location: ?p=Topscores"); 
            exit; 
        } 
        
$data mysqli_fetch_array($query); // $data['ROW_NAME']; 

        
echo $data['Name']; 
 } else { 
?> 
For some reason it always selects the first row
Reply


Messages In This Thread
[PHP]Help me with get account data - by thimo - 12.02.2014, 13:56
Re: [PHP]Help me with get account data - by kN1GhT - 12.02.2014, 14:22
Re: [PHP]Help me with get account data - by thimo - 12.02.2014, 14:26
Re: [PHP]Help me with get account data - by Kirollos - 12.02.2014, 14:49
Re: [PHP]Help me with get account data - by thimo - 12.02.2014, 15:37

Forum Jump:


Users browsing this thread: 2 Guest(s)