I have some information in my database like 'author' 'book', etc that are all related to a 'note_id', which is related to a 'user'. I query the DB for the note id. and i get thus back:
*note_id assoc array*
Array ( [0] => 32 ) Array ( [0] => 31 ) Array ( [0] => 33 ) Array ( [0] => 34 ) Array ( [0] => 35 ) Array ( [0] => 36 ) Array ( [0] => 37 ) Array ( [0] => 38 ) Array ( [0] => 39 ) Array ( [0] => 40 ) Array ( [0] => 41 ) Array ( [0] => 42 ) Array ( [0] => 43 ) Array ( [0] => 44 ) Array ( [0] => 45 ) Array ( [0] => 46 )
What i am trying to do is use all of these values to grab each book review, (with author, book, etc.) then display it to the user in order. One by one.
What's the next step for me to be able to do this?
Here is the code i am using:
<?php
//Starting session
session_start();
//Includes mass includes containing all the files needed to execute the full script
//Also shows homepage elements without customs
include ('includes/mass.php');
//Set the session variable
$username = $_SESSION['username'];
//Check to see if logged in
if (isset($username))
{
//Check all databases assoc with the notes for username submissions
$sql_for_username_submission = "SELECT note_id FROM notes WHERE user = '$username'";
$get_data = mysql_query($sql_for_username_submission);
while ($data_row = mysql_fetch_assoc($get_data))
{
$name_id = $data_row;
}
}
?>
Please help. I'm a bit lost on this one.
Thank you!