O ile wiem każdy nowy użykownik ma problem z zalogowaniem się.
teraz mam problem z rejestracją ... Wyskakuje że taki login istnieje a go nie ma w bazie.
Może znajdziecie tu błąd :/
<?php
include('baza.php');
?>
<center>
<h2>Rejestracja</h2><br>
Zarejestruj siÄ™ juĹĽ teraz! <br><br>
<form action="register.php" method="post">
Login: <br><input type="text" name="user"><br>
Email: <br><input type="text" name="email"><br>
Hasło: <br><input type="password" name="password"><br>
Powtórz hasło:<br><input type="password" name="password1"><br>
<input type="submit" name="reg" value="Zarejestruj!">
<br><br>
<?php
$user = $_POST['user'];
$email = $_POST['email'];
$pass = $_POST['password'];
$pass1 = $_POST['password1'];
$ip = $_SERVER["SERVER_ADDR"];
$data = date('d-m-y H:i:s'); $pass = md5($pass); // Szyfrowanie hasla
{
if(!$user || !$email || !$pass || !$pass1)
{
echo '<font color="red"><b>Proszę wypełnić wszystkie pola.</b></font>'; include('dol.php');
}
{
echo '<font color="red"><b>Wybrany login jest za krĂłtki.</b></font>'; include('dol.php');
}
{
<font color="red"><b>Wybrany email jest za krĂłtki.</b></font>';
include('dol.php');
}
{
echo '<font color="red"><b>Podane hasło jest za krótkie.</b></font>'; include('dol.php');
}
if($pass != $pass1)
{
echo '<font color="red"><b>Podane hasła nie są identyczne.</b></font>'; include('dol.php');
}
$email = $_POST ["email"];
if(isset($sprawdzenie['user'])) {
echo '<font color="red"><b>Taki login, posiada juĹĽ ktoĹ› inny.</b></font>' ; include('dol.php');
}
elseif(isSet($sprawdzenie['email'])) {
echo '<font color="red"><b>Podany email jest juĹĽ wybrany przez innego gracza.</b></font>'; include('dol.php');
}
$ok = mysql_query("INSERT INTO `users` (`user`, `haslo`, `email` ) VALUES ('$user', '$pass', '$email')") or
die(mysql_error());
if($ok)
{
echo '<font color="green"><b>Zostałeś poprawnie zarejestrowany.</b></font></center>';
}
}
if($_GET['ref'])
{
$do = $info['user'];
<h2>Rejestracja</h2><br>
Zarejestruj sie - Polecony!<br><br>
<form action="register.php?ref='.$do.'" method="post">
Login: <br><input type="text" name="user"><br>
Email: <br><input type="text" name="email"><br>
Hasło: <br><input type="password" name="password"><br>
Powtórz hasło:<br><input type="password" name="password1"><br>
Polecony:<br><input type="text" name="polecony" value="'.$do.'" disabled="disabled"><br>
<input type="submit" name="reg" value="Zarejestruj!">
<br><br>';
$user = $_POST['user'];
$email = $_POST['email'];
$pass = $_POST['password'];
$pass1 = $_POST['password1'];
$ip = $_SERVER["SERVER_ADDR"];
$data = date('d-m-y H:i:s'); $pass = md5($pass); // Szyfrowanie hasla
{
if(!$user || !$email || !$pass || !$pass1)
{
echo '<font color="red"><b>Proszę wypełnić wszystkie pola.</b></font>'; include('dol.php');
}
{
echo '<font color="red"><b>Wybrany login jest za krĂłtki.</b></font>'; include('dol.php');
}
{
elseif(strlen($email) < 6)
<font color="red"><b>Wybrany email jest za krĂłtki.</b></font>';
include('dol.php');
}
{
echo '<font color="red"><b>Podane hasło jest za krótkie.</b></font>'; include('dol.php');
}
if($pass != $pass1)
{
echo '<font color="red"><b>Podane hasła nie są identyczne.</b></font>'; include('dol.php');
}
$email = $_POST ["email"];
if(isset($sprawdzenie['user'])) {
echo '<font color="red"><b>Taki login, posiada juĹĽ ktoĹ› inny.</b></font>' ; include('dol.php');
}
elseif(isSet($sprawdzenie['email'])) {
echo '<font color="red"><b>Podany email jest juĹĽ wybrany przez innego gracza.</b></font>'; include('dol.php');
}
$ok = mysql_query("INSERT INTO `users` (`user`, `haslo`, `email`, `data_rejestracji` ) VALUES ('$user', '$pass', '$email', '$data')") or
die(mysql_error()); mysql_query("INSERT INTO wiadomosci SET do_kogo='$user', temat='Witamy w (HM)', tresc='Witaj! <br> Na poczÄ…tku gry masz 20.000 € wiÄ™c udaj siÄ™ do sklepu, gdzie kupisz części. Za resztÄ™ kasy moĹĽesz potrenować. <br><br> Powodzenia!', stan=1, od_kogo='System gry', data='$data' ");
if($ok)
{
echo '<font color="green"><b>Zostałeś poprawnie zarejestrowany.</b></font></center>';
}
}
}
?>