@cigoL
changed double quotes to single quotes in the SESSION variable on both index.php and admin_login.php = No luck, thank you for the catch though.
@gabrielcastillo
I tried bypassing the connect_to_mysql.php file by connecting to the database directly from my admin_login.php file like you told me to. That gave me the same situation, no errors but I'm rerouted back to the admin_login.php as the $_SESSION['manager'] variable is not set.
I included a var_dump in both my index.php file (which I never was directed to) and also my admin_login.php file (which shows null on all criteria) which makes total sense because if nothing was ever set, that's clearly the reason why I'm back on admin_login.php.
However, when I input an incorrect password and var_dump($id, $manager, $password) on my error page, I notice that ID does not show but Manager and Password do. I'm not sure if this is where my issue is (I feel it may be), but I am curious as to why this variable doesn't show.
@GliderPilot
Do you have any suggestions for my php.ini file? I should say, I am not working locally. I upload all files to my server and am making dynamic changes to the test site. I believe I only have that file because I installed XAMPP to do local php developing, but again, as a noob, I don't really know if that is true. Thanks.
@AndreRet
When I change from
$manager = preg_replace('#[^A-Za-z0-9]#i', '', $_POST['username']); // filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i', '', $_POST['password']); // filter everything but numbers and letters
$password = md5($password);
$sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1");
to this...
$manager = preg_replace('#[^A-Za-z0-9]#i', '', $_POST['username']); // filter everything but numbers and letters
$password = preg_replace('#[^A-Za-z0-9]#i', '', $_POST['password']); // filter everything but numbers and letters
$sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password='".md5($password)"' LIMIT 1");
How does that minimize the security risk? It seems that I have a variable that is stored as md5 in my database but is being passed in its unconverted form. I say this because I var_dump($password) on my error page and as expected I see the original password when I puposefully input the wrong password.
Thank you all for your help, I went to sleep and woke up to so much help, it's not working for me just yet but I do appreciate your expertise.