MySQL, PHP & HTML Help

Hello !
I want to make a code that display some rows from database.
The problem is that it doesn’t display them…
Database is connected, in another script, and the value “Username_” is taken from database.
Why the “echo” rows doesn’t display ?

THe Code:

Problem solved !
It wasn’t connect correctly to database

You have not write code to connect your database. Also, check mysqli_fetch_assoc($result_) it should be mysqli_fetch_assoc($result). And also use mysqli_fetch_assoc($result) inside while loop because its return an array.

while($row = mysqli_fetch_assoc($result)){ ?>

<tr><th><?php echo $row[‘username’]; ?></th><tr>

<?php } ?>

Sponsor our Newsletter | Privacy Policy | Terms of Service