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
The hyper link syntax i have is throwing up errors:
$query = "SELECT * FROM artists";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo
"<a target='Main_Frame' href=Side_Menu_ContentPrint.php?Aname=<?php echo
$_POST['ArtistName'] ?>" . $row['ArtistName'] . "</a>";
}
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:
$artist_Name = $_GET['Aname'];
echo "$artist_Name";
Just to show also, the following hyper link is working:
while($row = mysql_fetch_array($result))
{
echo
"<a target='Main_Frame' href=Side_Menu_ContentPrint.php>" . $row['ArtistName'] . "
</a>";
}
and when click on it echos a test word to prove that it is working. Any help would be great?
Regards, TW
you can't put PHP code into echo and hope that it will run again.
Try this,