title: in messaging system i don't know how to view message
body: <p>i am new in php i want to know how to view message </p>
  
  <p>this is my code</p>
  
  <pre><code>$idto = $_GET['id'];
  $query2 = mysql_query("select * from users where id =".$idto." ");
  $row2 = mysql_fetch_assoc($query2);
  echo "&lt;b&gt;&lt;font size='6' face='Comic Sans MS'&gt;&lt;center&gt;".$row2['firstname']."&lt;/center&gt;&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;";
  
  
  $query2 = mysql_query("select * from message  where id_from =".$idto."  and id_to =". $_SESSION['id']." ORDER BY id");
  $query1 = mysql_query("select * from message  where id_to =".$idto."  and id_from =". $_SESSION['id']." ORDER BY id");
  </code></pre>
  
  <p>i select message send by user1 &amp; by user 2 but i dont know how to view them correctly 
  when i use  this</p>
  
  <pre><code>while ($row = mysql_fetch_assoc($query2) ) 
  {
  
  
  echo'&lt;fieldset style="width:250" align="center"&gt;';
  echo"&lt;legend&gt;&lt;b&gt;".$row2['firstname']."&lt;/b&gt;&lt;/legend&gt;";
  echo $row['message'];
  echo "&lt;br&gt;";
  echo $row['date'];
  echo"&lt;hr&gt;";
  echo"&lt;/fieldset&gt;";
  
  
  }
  
  
  
  while ($row1 = mysql_fetch_assoc($query1) ) 
  {
  
  
  
  
  echo'&lt;fieldset style="width:250" align="center"&gt;';
  echo"&lt;legend&gt;&lt;b&gt;".$_SESSION['firstname']."&lt;/b&gt;&lt;/legend&gt;";
  echo $row1['message'];
  echo "&lt;br&gt;";
  echo $row1['date'];
  echo"&lt;hr&gt;";
  echo"&lt;/fieldset&gt;";
  
  
  
  
  }
  </code></pre>
  
  <p>it view messages but in incorrectly way 
  can any one help me please thanks :) 
  if you dont understand what i am saying 
  i mean i want to know how to view message </p>