I then want to be able to click those links, go to a seperate page and on that page get up the band details, to do this I need to pass the band name to the page the link is going to. I thought I could do this using $_GET but it hasn't worked, the code is below.
Here is the code ont he first page.
Code: Select all
$query="SELECT * FROM band";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num)
{
$band=mysql_result($result,$i,"band_name");
//Link here, shows up no problem
echo'<a href="bandview.php?band=$band">'.$band; echo'</a>';
i++;
}Code: Select all
include('connect.inc');
$band = $_GET['bandname'];
echo .$band;