Jump to content

Url Id Lookup?


Rustage
 Share

Recommended Posts

Sorry about the lame title, im not entirely sure what the name of what im trying to do is. Im wondering if anyone can point me in the right direction of what sort of tutorial I should be looking for.What i'd like to do is for my page to load certain data from a database, for example..http://www.domain.com/index.php?id=1 - Would lead me to my "index.php" page, but load the data from my database for the row with the ID '1'.Im sure i've done it before, and remember it being pretty straight forward but as I havent used PHP in years im pretty much starting from scratch,Thanks very much, Rustage.

Link to comment
Share on other sites

$_GET['id']

will give you the value of the "id" query string variable. You can use that value when creating the SQL statement for the database.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...