btd117 Posted November 9, 2006 Share Posted November 9, 2006 I am tring to create a link like this:/page.php?id=2I have this code:<?phpinclude 'admin/global.php';$result = mysql_query("SELECT * FROM ncaa ORDER BY id WHERE id='$id'");while($row=mysql_fetch_array($result)) { print '<p>' .$row['id']. '</p>'; }?>the page yields no results...what am I missing? The id field is set as the primary in the dB. Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/26710-help-with-passing-variables-in-url/ Share on other sites More sharing options...
trq Posted November 9, 2006 Share Posted November 9, 2006 [code=php:0]$result = mysql_query("SELECT * FROM ncaa ORDER BY id WHERE id='{$_GET['id']}'");[/code] Link to comment https://forums.phpfreaks.com/topic/26710-help-with-passing-variables-in-url/#findComment-122179 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.