Basically I have a database that so far has information for users and videos submitted by the users. I want to give users the ability to view all of the videos they have submitted which are stored in the database table vids. There are likely to be multiple results for this which is why I need to know how to handle multiple rows. So far what I have read has gone over my head and though I can return the first row (thanks to this Dream In Code post). What I really want to be able to do is display the rows neatly in the page so would be nice if they could be made into variables that I can then call later in my HTML. The relevant code I have so far is as follows:
$user_id = $_SESSION['id']; $query = "SELECT * FROM vids WHERE user_id = $user_id"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result)
Then just for the sake of testing this I have later in the script (where the HTML is):
<?php print_r($row); ?>
If anyone can help it would be greatly appreciated.