Im trying to return the variables of these items , but they are returning only 1 time , and every row is getting assigned the the same variables .. let me explain
$result = mysql_query("SELECT `note_id`, `to`, `from`, `time`, `read` FROM `shocc_notes` WHERE `to` = '$sess_user' AND `inbox` = 'deleted' ORDER BY `time` DESC") or die(mysql_error());
if (mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {$notes[] = $row;
$link_id = $row['note_id'];
$link_name = $row['from'];
$links = "<a class = 'textbluebold' href='/read_note.php?note=$link_id'>Read Note<a/> |
<a class = 'textbluebold' href='/block_user.php?user=$link_name'>Block User</a>";
}
In the code above , its for a private notes script , i fetch the data from sql , then assign the links .. Read Note .. Delete note , ect
Well if their are 5 notes , 10 notes , ect , all the note_id's are being returned as the same .. Instead of the first message having one note_id , the second having it's note_id .. its marking all note_id's , as the same .. which obviously isnt correct since they are all different in sql
How can i get this to assign correct variables for each row returned from sql?