Thanks to some advice on this forum I managed to get my page correctly checking for a cookie and processing the page as intended. Unfortunately a form to email script actioned when the form is submitted doesnít work now. (it should send the value of 'email' to a specified address). The script hasnít been modified, just the PHP code that determines whether to display the login form or not.
I have included the amended logic below. Appreciate suggestions for what is the problem here.
if I use the $_SERVER approach the cookie aspect works fine but the form to email script doesn't execute.
Any further ideas?
Have a look at the HTML source code in your browser. I'm betting that when you "use the $_SERVER approach" you end up with action="" in your HTML page. It won't execute the script becuse you're not telling it where the script is!
yes it will execute the script with the action that way, but fails to recognise the cookie and related logic. ie won't display the link if a cookie is present on the users computer, still shows the form.