You got it wrong, $username and $password are variables passed, by a form to this script.
It's just the 'if' statement with the $correct. You do not understand what I mean with it...
Now keep that in mind and read this script:
<?PHP
$set_username=maxsslade;
$set_password=nomethma;
if (isset($username) && isset($password)){
if ($username == $set_username && $password == $set_password){
// Here comes the protected content
$wrongpass = false;
} else {
$wrongpass = true;
}
} else {
$wrongpass = true;
}
if ($wrongpass == true){
//Here comes output when no/wrong login is made
}
?>
I hope you're not confused anymore...
I'd like to hear if this works,
YS,
J Westerhof