witam
mam problem ze skryptem .
Po zalogowaniu niechce mi pzekierowac na strone profilu uzytkownika tylko wyskakuje komunikat niema takiego usera prosze o pomoc.
skrypt index
<?php
// zmienna potrzebna do prawidlowego wczytania includowanych plikow
$add_site = true;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="kess@snug.pl" />
<meta name="Author" content="Krzysztof Szypulski" />
<head>
<title>Szablon strony WWW z wykorzystaniem PHP</title>
<style type="text/css">
<!--
body {
font-family: Verdana, Arial;
font-size: 12px;
}
-->
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="3"><?php include "include/naglowek.php"; ?></td>
</tr>
<tr>
<td width="15%" valign="top"><?php include "include/menu_lewe.php"; ?></td>
<td width="70%" valign="top">
<?php
// zmienna $go przekazana metoda GET
$go = $_GET['go'];
// sprawdzamy czy zmienna $go nie jest pusta
// sprawdzamy czy plik o danej nazwie istnieje
if(is_file("page/$go.php")) include "page/$go.php"; // jezeli plik nie istnieje wyswietla się komunikat
else echo "<br />Nie ma takiej strony :-("; }
// jezeli zmienna $go jest pusta wyswietla się strona glowna
else include "page/logowanie.php";
?>
</td>
<td width="15%" valign="top"><?php include "include/menu_prawe.php"; ?></td>
</tr>
<tr>
<td width="100%" colspan="3"><?php include "include/stopka.php"; ?></td>
</tr>
</table>
</body>
</html>
i logowanie
<?php
require 'config.php';
require_once 'user.class.php';
if ($_POST['send'] == 1) {
if (!$login or
empty($login)) { die ('<center><font color="#FF0000"><p class="error">Wypełnij pole z loginem!</p></font><br><a href="#"><a href="login.php">Powrót</a></center>'); }
if (!$pass or
empty($pass)) { die ('<center><font color="#FF0000"><p class="error">Wypełnij pole z hasłem!</p></font><br><a href="#"><a href="login.php">Powrót</a></center>'); }
$pass = user::passSalter($pass);
if ($userExists[0] == 0) {
echo '<center><font color="#FF0000"><p class="error">Użytkownik o podanym loginie i haśle nie istnieje.</p></font></center>'; }
else {
$user = user::getData($login, $pass);
$_SESSION['login'] = $login;
$_SESSION['pass'] = $pass;
echo "zostałeś zalogowany"; header("Location: index.php?go=profil=".$user['login']);
}
}
else {
}
?>