Jump to content

help with passing variables in url


btd117

Recommended Posts

I am tring to create a link like this:

/page.php?id=2

I have this code:

<?php

include '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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.