Auto-Login Not Working
Can't understand why Auto-Login is not working on my attached login page.
Can someone take a quick look and let me know what is missing.
THanks,
Can't understand why Auto-Login is not working on my attached login page.
Can someone take a quick look and let me know what is missing.
THanks,
it looks like it is configured correctly.
Are cookies being saved when the remember me option is set?
using FireFox with the web developer toolkit, There is a view cookie option that will allow you to see the cookies that are set, use this to see what the Auto login cookies are being set to.
Jason,
It appears my 4 cookies (AutoLoginUN, AutoLoginPWD, RememberMePWD, RememberMeUN) are being set properly upon the first login. Then when I logout, and go back to the login page, the cookies are still set, but it is not auto-logging in.
I placed the following code at the bottom of the login page to show if my cookies hold value upon reload:
Cookies<br>
<?php echo((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") ?><br>
<?php echo((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") ?><br>
<?php echo((isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMePWD"]:"") ?><br>
<?php echo((isset($_COOKIE["RememberMeUN"]))?$_COOKIE["RememberMeUN"]:"") ?>
Any further advice.
try changing line 70:
if((((isset($_SESSION["id_users"]) && $_SESSION["id_users"] != "")?"LoggedIn":"") == "")&&(((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
to:
if((((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
Jason,
That worked!! Great...thanks for your help, I will keep this code change for future projects.
-Dan.
glad to hear it is working.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.