MySQLi
#2

PHP код:
if($run mysqli_query($con"SELECT * FROM `users` WHERE `username` = '$username' AND `password` = '$password'")) { 
        if(
mysqli_num_rows($run)) {
                while(
$row mysqli_fetch_assoc($run)) { 
                        
$activation[] = $row['activate']; 
                }
        }else{
                echo 
"no rows";    
        }
}else{
        echo 
"query error";

I guess you're trying to get data from multiple rows, then you will need to add [] at the end, so it will use the last free slot.
Reply


Messages In This Thread
MySQLi - by BleverCastard - 25.03.2015, 20:01
Re: MySQLi - by Kaperstone - 25.03.2015, 20:21
Re: MySQLi - by Vince - 25.03.2015, 20:23
Re: MySQLi - by BleverCastard - 25.03.2015, 20:28
Re: MySQLi - by Misiur - 25.03.2015, 20:44
Re: MySQLi - by Kaperstone - 25.03.2015, 20:48
Re: MySQLi - by BleverCastard - 25.03.2015, 21:01
Re: MySQLi - by Misiur - 25.03.2015, 21:15
Re: MySQLi - by BleverCastard - 25.03.2015, 21:54
Re: MySQLi - by Michael@Belgium - 28.03.2015, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)