• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Loading certain database records with html link? (PHP)

How can I set a website to load a certain database record on a page load when the page is opened with a link embedded in the site?

I have a page that lists a bunch of game recaps from my hockey team. I want to be able to click a link beside each game that loads up a new page that shows the recap for the game.

I see it all the time with something like:

http://www.domain.com/recap.php?=someID

how do you get the "someID" part into a variable when recap.php loads?

 
Using the $_GET superglobal associative array. If you access a page with:
page.php?foo=bar
then within the script, $_GET['foo'] will hold the string "bar"
 
Originally posted by: Templeton
Using the $_GET superglobal associative array. If you access a page with:
page.php?foo=bar
then within the script, $_GET['foo'] will hold the string "bar"

Thank you very much. That's what I needed.
 
Back
Top