MySQL, PHP & HTML Help


#1

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:
Capture


#2

Problem solved !
It wasn’t connect correctly to database


#3

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 } ?>