In my first page I have I have a query that returns tournaments names in a table in this format
echo "<td><a href='tournament.php'>" . $info['tournament'] . "</a></td>";
$info['tournament'] has the tournament name which when clicked takes me to the page tournament.php where I have this code
$data = mysql_query("SELECT team1,score1,team2,score2 FROM smite where tournament='';") or die(mysql_error());
what i want is to have the value clicked in the previous page that linked to this one, in tournament='HERE' so that the query retrieve the data for that tournament
i have tried
echo "<td><a href='tournament.php?tournament=".$info['tournament']."'>" . $info['tournament'] . "</a></td>";
and
$tournamentName = $_GET['tournament'];
$data = mysql_query("SELECT team1,score1,team2,score2 FROM smite where tournament='$tournamentName';") or die(mysql_error());
the query returns empty and when i print $tournamentName i get for example (Golden Cup) which should be (Golden Cup #1)
the $_GET removed #1 which is why the query returns NULL and if i do partial match to $tournamentName i will get all the Golden Cup tournaments not just the one i clicked
can anyone help me solve this problem ?
Thank you