I’ve been Google-ing this for the past 24 hours, pretty much. I can’t seem to find an answer that fits my scenario, even though I know it’s widely used.
I have many links on one page (let’s call it “page 1”) of my website and I would like to them all to head to one, blank page (and this “page 2”) and then have the content dynamically load, depending on what link was clicked on the previous page.
All I know is that I need to be able to set a PHP variable with the hyperlinks on page 1 and use some kind of if(isset($_SESSION['phpVariable'])){ include('path/content.fileExt')} on page 2 page so that it’s ready to receive the variable and load the content accordingly.
I just have no clue how to do this, as I only started learning PHP yesterday. Help? 🙁 :L
You could use the
$_GET[]variable. On page1, the links could be topage2?food=baconorpage2?food=foo. On page2, you could say…