Merhaba arkadaslar ben yeni php baslangictayim ve yardim istedigim konu ise buradaki hata bir turlu log in olamiyorum . Yardiminiz icin tesekkurler simdiden .yanlis nedir cozemiyorum sadece admin login e gelince tekrardan ana sayfa gibi gosteriyor. hic bir farki olmuyor onceden cok tesekkurler
admin login <?php session_start(); if(!isset($_SESSION["manager"])){ header("location:index.php"); exit(); } ?> <?php //be sure the check that this manager SESSION value is in fact in the database if(isset($_POST["username"])&& isset($_POST["password"])){
<?php session_start(); if(!isset($_SESSION["manager"])){ header("location:admin_login.php"); exit(); } //be sure the check that this manager SESSION value is in fact in the database $managerID = preg_replace('#[^0-9]#i','', $_SESSION["id"]); $manager = preg_replace('#[^A-Za-z0-9]#i','', $_SESSION["manager"]); $password = preg_replace('#(^A-Za-z0-9]#i','', $_SESSION["password"]);
include "../storescripts/connect_to_mysql.php"; $sql = mysql_query("SELECT*FROM admin WHERE id = '$managerID' AND username ='$manager' AND password='$password' LIMIT 1"); $existCount = mysql_num_rows($sql); if($existCount==0) { header("location:../index.php"); echo "Your login session data is not on record in the database", exit(); }