Merhaba Sitemde login giriş mevcut

Giriş Yapıldıktan sonra
login formunu gizleyip hoş geldin demem gerek yardımcı olur musunuz?


session_start();
include("inc/fonk.php");

if (isset($_SESSION["Oturum"]) && $_SESSION["Oturum"] == "6789") {
echo çalışıyor;
}
else if (isset($_COOKIE["cerez"])) {


$sorgu = $baglanti->prepare("select kullanici from kullanicilar");
$sorgu->execute();


while ($sonuc = $sorgu->fetch()) {

if ($_COOKIE["cerez"] == md5("aa" . $sonuc['kullanici'] . "bb")) {


$_SESSION["Oturum"] = "6789";
$_SESSION["kullanici"] = $sonuc['kullanici'];


}
}
}
if ($_POST) {
$txtkullanici = $_POST["txtkullanici"];
$txtParola = $_POST["txtParola"];
}
?>











if ($_POST) {

$sorgu = $baglanti->prepare("select parola from kullanicilar where kullanici=:kullanici");
$sorgu->execute(array('kullanici' => htmlspecialchars($txtkullanici)));
$sonuc = $sorgu->fetch();

if (md5("56" . $txtParola . "23") == $sonuc["parola"]) {
$_SESSION["Oturum"] = "6789";
$_SESSION["kullanici"] = $txtkullanici;


if (isset($_POST["ckbHatirla"])) {
setcookie("cerez", md5("aa" . $txtkullanici . "bb"), time() + (60 * 60 * 24 * 7));
}
echo "giriş başarrdım";
} else {

echo "Kullanıcı adı veya parola yanlış!";
}
}
?>