Ben bu başlık bir komut ilk şey olması gerektiğini söylüyor Manuel biliyorum, ama nasıl bazı kodlar burada header("Location: member.php?id=$username") içinde görmek gelip bir if-ifadesi?
Ex:
//a bunch of codes above
if($result!="0"){
// authenication correct lets login
$_SESSION["password"] = $password;;
$_SESSION["username"] = $username;
header("Location: member.php?id=$username");
}
else
{
echo "Wrong username or password. Please try again!";
}
But when I do this, it sometimes would/won't throw an error. How do I allow the header (); to be used in a script without any errors? I want to redirect the user back to the login if they click "no" and to the homepage if they click "yes".