troubleshooting Question

Again, problems with a remember me option

Avatar of John Account
John Account asked on
4 Comments1 Solution218 ViewsLast Modified:
I have this code, which I initially had problems with, then posted a question on experts and found a working solution, only that solution is no longer working for some strange reason.  I tried several different things, but those darn username and password cookies never get set... can anyone look my code over and see if there is anything wrong with that?



<script language="JavaScript" src="inc/js/bot.js"></script>


if (isset($_GET[remember])) {
$username = $_GET[user_name];
 setcookie("username",$username,time()+3600*24*30, '/');
$password = $_GET[password];
 setcookie("password",$password,time()+3600*24*30, '/');

elseif (isset($_COOKIE[username])) {
$username = $_COOKIE[username];
$password = $_COOKIE[password];



<script language="JavaScript">
      var fileType = "php";
      function openChat() {
            var user_name = document.ChatForm.user_name.value;
            var password = document.ChatForm.password.value;'messengerxm.php?user_name='+user_name+'&password='+password,'','toolbars=0,menubar=0,scrollbars=0,status=0;');window.focus();      

      BODY,P,TD {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;}

<body leftmargin="50" topmargin="0" scroll=no background="" scroll="auto">

<form action= "#thanks" name="ChatForm" >
<table border="0"  >
            <td><a name="login">username&nbsp;&nbsp;&nbsp;   <input type="text" name="user_name" value="<? if (isset ($username)) { echo $username; } ?>" size="10"></td>
            <td>password&nbsp;&nbsp;&nbsp;    <input type="password" name="password" value="<? if (isset ($password)) {echo $password; } ?>" size="10"></td>

<? if (isset($username)) {
echo '';
} else { ?>

</tr><tr><td colspan="2" align="left"><input type="checkbox" name="remember">
<font size="2"><font size=1>Remember me</font></td></tr>
<? } ?>

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros