Thanks for the script, and thank you dtkguy for that fix
Printable View
Thanks for the script, and thank you dtkguy for that fix
Nice find and thank you for providing a fix for it.
If you figure out the header error when logging into the admin that would be awesome :) Seems the header is being sent twice when logging in. Even though it doesnt effect it since its prior to the admin redirect.
the header error fix :
at around lines 74-86 in adminlogin.php you'll see this:
we don't need the header("Location: admincp.php"); the meta refresh is what we're looking for, but sending the headers skips that, thus the error. just comment out or delete that line. (i commented it out for sake of keeping original code).Code:else {
$check = mysql_query("SELECT * FROM `admin` WHERE `username` = '$username' AND `password` = '$password'") or die('Error selection');
if(mysql_num_rows($check) == '1') {
$_SESSION['username'] = "$username";
$_SESSION['password'] = "$password";
header("Location: admincp.php");
echo "<meta http-equiv=\"refresh\" content=\"2; admincp.php\" /><div class=\"generated\">You are logged in. Redirecting..</div>";
}
seems to be working fine for me.Code:/* header("Location: admincp.php"); */
Cheers!
Cheers for dtkguy :)
I have to say you are a keeper ;) Thank you now I have a link to refer people to when they ask about this error
dtkguy if you want I have urlxp.com @ namecheap if you want it for you help on this
wow really. thats very kind of you! PM'ing you now.
thanks :)