I replaced my setcookie statements with that, and it still does the same thing.
Here is the updated actionenter.php file
<?php
$password1 = md5 ($password1); // MD5 the submitted password to reference from the MySQL table.
$loginquery = "SELECT * FROM user_db WHERE username='$username1' && password='$password1'"; // Select the appropriate user account
$loginresult = mysql_query($loginquery);
for ($l =0; $l < mysql_num_rows($loginresult); $l++)
{
if (!mysql_data_seek ($loginresult, $l))
{
printf ("Cannot seek to row %d\n", $l);
continue;
}
if(!($row = mysql_fetch_object ($loginresult)))
{
continue;
}
// Set the variables to be used later
$username = $row->username;
$name = $row->name;
$isadmin = $row->isadmin;
// Determine cookie length
if ($alwayslogin1 == 'on')
{
$loginlen1 = time()+101507200;
}
else
{
$loginlen1 = $loginlen1*60;
$loginlen1 = time()+$loginlen1;
}
// Set appropriate cookies
if($isadmin == '0')
{
setcookie ('ListingCookie', $username, $loginlen1, '/', '', 0);
setcookie ('ListingName', $name, $loginlen1, '/', '', 0);
setcookie ('ListingAdmin', '0', $loginlen1, '/', '', 0);
}
if($isadmin == '1')
{
setcookie ('ListingCookie', $username, $loginlen1, '/', '', 0);
setcookie ('ListingName', $name, $loginlen1, '/', '', 0);
setcookie ('ListingAdmin', '1', $loginlen1, '/', '', 0);
}
// Login was successful
$loginsuccess = "true";
}
?>