Having a problem getting the variable from the URL into my SQL statement. What am I doing wrong? If I hard code a variable in, I get the output.
whatson.php
....
echo"<tr>
<td width='15%' align='right'><font face='Trebuchet MS' size='2'>$startdate</font></td>
<td width='2%'><font face='Trebuchet MS' size='2'> </font></td>
<td><font face='Trebuchet MS' size='2'>$title</font></td>
<td width='15%'><font face='Trebuchet MS' size='2'><a href='whats_detail.php?$wid=$whatsid'>More >></a></font></td>
</tr>";
.....
whats_detail.php
.....
<?php
include ("config.inc.php");
$id=$_GET['wid'];
mysql_connect("$db_host", "$username", "$password");
mysql_select_db("$db_name") or die( "Unable to select database");
$sql="SELECT whatid, cost, venue, title FROM whatson WHERE whatid = '$id'";
$result=mysql_query($sql);
$myrow=mysql_fetch_array($result);
?>
.....
Thanks in advance.