title: How to pass a database value in a hyperlink using PHP + HTML
body: <p>I have a table in a database called Artists.
  It contains two bands.
  What I would like to do is to be able to click on the bands name using a hyper link, send that bands name to another php page to be processed</p>
  
  <p>The hyper link syntax i have is throwing up errors: </p>
  
  <pre><code>$query = "SELECT * FROM artists";
  
  $result = mysql_query($query);
  
  while($row = mysql_fetch_array($result))
  {                                  
     echo     
      "&lt;a target='Main_Frame' href=Side_Menu_ContentPrint.php?Aname=&lt;?php echo 
      $_POST['ArtistName'] ?&gt;" . $row['ArtistName'] . "&lt;/a&gt;";         
  }
  </code></pre>
  
  <p>So I would like the above hyperlink to pass the bands name to Side_Menu_ContentPrint.php file so I can echo it to the screen (and use for more DB querying also). This file connects to the DB and contains:</p>
  
  <pre><code>$artist_Name = $_GET['Aname'];
  
  echo "$artist_Name";
  </code></pre>
  
  <p>Just to show also, the following hyper link is working: </p>
  
  <pre><code>while($row = mysql_fetch_array($result))
  {    
     echo     
     "&lt;a target='Main_Frame' href=Side_Menu_ContentPrint.php&gt;" . $row['ArtistName'] . "  
     &lt;/a&gt;";                                                           
  }
  </code></pre>
  
  <p>and when click on it echos a test word to prove that it is working.
  Any help would be great?</p>
  
  <p>Regards, TW</p>