I have searched up and down on both MySQL and PHP sections and I couldn’t find anything that could help me out here.
I’m using Dreamweaver and it’s a b**** to get this. I’m an amateur with PHP so please be patient with me. Now my question is ( I have both index.php-login page, and home.php-home page to be redirected to ) I place the restriction on index.php-login page correct? This is my code, I’ve tried placing it on both actually but I’m always getting this error (tried it on all browsers I have installed)
Well if you’ve put this code as-is into both pages, you’ve successfully created an infinite loop.
Person calls index.php.
Index.php says “I see no login username. Redirect the browser to index.php”
Header command goes to browser. Browser sends user to index.php
Index.php says “I see no login username. Redirect the browser to index.php”
(Rinse, Repeat, Ad Infinitum)
Assuming index.php is the page which has your login, you only want the code there.
And, assuming the above, you dont want to redirect to index.php FROM index.php, because thats just a loop. (Unless something changes; Have I ever told you, the definition of insanity? [yes, i know, my accent needs work])