piotrekk Posted August 6, 2007 Share Posted August 6, 2007 I have a problem. This is the php code: <?php //1. sprawdzanie czy uzytkownik jest zareejstrowany ( spr. sesji) require_once "include/function.php"; require_once "include/mysql.inc"; error_reporting(E_ALL); session_start(); if(!isset($_SESSION["login"]) || !isset($_SESSION["loginIP"]) || ($_SESSION["loginIP"] != $_SERVER['REMOTE_ADDR'])) { unregisterLogin(); header("Location : panelLogowanie.php"); exit; } else{ /*if (!autentycznoscSesji()) { unregisterLogin(); header("Location : panelLogowanie.php"); die; }*/ $format = strip_tags($_GET['format']); $ilosc = strip_tags($_GET['ilosc']); $kolor = strip_tags($_GET['kolor']); $cena = strip_tags($_GET['cena']); $login = $_SESSION['login']; if (!($connection = @mysql_connect($host, $dbLogin, $haslo)) || !mysql_select_db($baza, $connection)) { die("Wystapił problem z połaczeniem z bazą danych, prosimy powiadomić o tym właściciela serwisu\n"); } $sql = mysql_query("SET names utf8", $connection); $query = "SELECT nazwa, adres, kod, nip, miasto FROM users WHERE login = '$login'"; $result = mysql_query($query, $connection); $row = mysql_fetch_array($result); $nazwa = $row["nazwa"]; $adres = $row["adres"]; $kod = $row["kod"]; $nip = $row["nip"]; $miasto = $row["miasto"]; // nazwa sesji produktów $_SESSION["produkt"]["format"] = $format; $_SESSION["produkt"]["ilosc"] = $ilosc; $_SESSION["produkt"]["kolor"] = $kolor; $_SESSION["produkt"]["cena"] = $cena; //sesja danych zamawiajacego $_SESSION["dane"]["nazwa"] = $nazwa; $_SESSION["dane"]["adres"] = $adres; $_SESSION["dane"]["kod"] = $kod; $_SESSION["dane"]["nip"] = $nip; $_SESSION["dane"]["miasto"] = $miasto; print "html code"; } And after I login everything work but when i'm not login this: if(!isset($_SESSION["login"]) || !isset($_SESSION["loginIP"]) || ($_SESSION["loginIP"] != $_SERVER['REMOTE_ADDR'])) { unregisterLogin(); header("Location : panelLogowanie.php"); exit; } ?> doesn't work and i'm not direct to panelLogowania.php. It just show me white screen. This is script from small print shop. This is how it work. ulotki.php--order-->szybkieZamowienieUlotki.php(scipt on top) pls help. thanks all. EDITED BY WILDTEEN88: Please use code tags ( ) when pasting code within posts Quote Link to comment https://forums.phpfreaks.com/topic/63536-problem-with-autentic-session/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.