Próbujê zrobiæ sobie rejestracja ale mam b³±d w lini 82 .
<?php
include "conn.inc.php";
?>
<?php
if (isset ($_POST['submit'])) { if ($_POST['login'] != "" &&
$_POST['haslo'] != "" &&
$_POST['haslo2'] == $_POST['haslo'] &&
$_POST['regulamin'] != "" &&
$_POST['email'] !== "" ) {
$query = "SELECT login
FROM uzytkownicy
WHERE login = '".$_POST['login']."' ";
?>
Nazwa u¿ytkownika
<?php echo $_POST['login']; ?> jest ju¿ zajêta, proszê wybraæ inn±!
<form action="rejestracja.php" method="post">
Login <input type="text" name="login" size="20" maxlength="40">
Has³o <input type="password" name="haslo" size="20" maxlength="40">
Powtórz has³o <input type="password" name="haslo_2" size="20" maxlength="40" >
Email <input type="text" name="email" size="20" maxlength="40" >
<input type="checkbox" name="regulamin" value="tak" > Akceptujê <a href="regulamin.php">regulamin</a>
<?php $today = date("Y-m-d"); ?> <input type="submit" name="submit" value="Zarejestruj" >
<input type="reset" value="Wyczy¶æ"></form>
<?php
} else {
if ($_POST['haslo_2'] != $_POST['haslo']) {
?>
Podane has³a s± ró¿ne!
<?php
} else {
$query = "INSERT INTO `uzytkownicy` (login, haslo, haslo_2, email, today)
VALUES (
'".$_POST['login']."',
'".$_POST['haslo']."',
'".$_POST['haslo_2']."',
'".$_POST['email']."',
);";
$_SESSION['user_logged'] = $_POST['login'];
$_SESSION['user_password'] = $_POST['haslo'];
?>
Dziêkujemy za zarejestrowanie sie
<?php echo $_POST['login']; ?> Kliknij <a href="index.php">tutaj</a> aby przej¶æ do strony g³ównej.
<?php
} else {
?>
Wype³nij wszystkie pola.
<form action="rejestracja.php" method="post">
Login <input type="text" name="login" size="20" maxlength="40">
Has³o <input type="password" name="haslo" size="20" maxlength="40">
Powtórz has³o <input type="password" name="haslo_2" size="20" maxlength="40" >
Email <input type="text" name="email" size="20" maxlength="40" >
<input type="checkbox" name="regulamin" value="tak" > Akceptujê <a href="regulamin.php">regulamin</a>
<?php $today = date("Y-m-d"); ?> <input type="submit" name="submit" value="Zarejestruj" >
<input type="reset" value="Wyczy¶æ"></form>
<?php
} else {
?>
Witamy na stronie rejestracji
<form action="rejestracja.php" method="post">
Login <input type="text" name="login" size="20" maxlength="40">
Has³o <input type="password" name="haslo" size="20" maxlength="40">
Powtórz has³o <input type="password" name="haslo_2" size="20" maxlength="40" >
Email <input type="text" name="email" size="20" maxlength="40" >
<input type="checkbox" name="regulamin" value="tak" > Akceptujê <a href="regulamin.php">regulamin</a>
<?php $today = date("Y-m-d"); ?> <input type="submit" name="submit" value="Zarejestruj" >
<input type="reset" value="Wyczy¶æ"></form>
<?php
}
?>