I have a quick question on the best way to show a particular message to users that navigated to a page via a particular link on the site.
The situation is I have a sidebar on the website and two of the links will point to the same page – one of them used to point to a page containing a form but now I want to change it to point to the same page as another link and display a message for users that clicked this particular link.
I tried changing the htaccess file and using HTTP_REFERER but because theses links are in a sidebar on every page that doesn’t work – never thought that one through at the time!
Now I have tried simply changing the link and adding a parameter on the end, e.g. /page.html?question=yes and then doing the following on the page:
if ($_GET['question'] == 'yes')
{
echo '..................';
}
But that doesn’t seem to be working either so I was wondering if anyone had came accross a similar problem and how they went about solving it?
Using $_GET and Querystring is the best match for you, but I’m not sure your file extension is being processed properly. Try to change .html to .php