Witam!
Pisze swoja strone i zrobilem kod rejestracji i mam dla was prozbe o sprawdzenie czy jest poprawny:
Plik: rejestracja.php<?
include('config.php');
if(?cmd=zarejestruj){
<form method="post"
action="?cmd=zarejestruj&dalej"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span>
<table style="text-align: left; width: 336px; height: 154px;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;">Login: </span><span
style="font-weight: bold;"><br>
</span><span style="font-weight: bold;"> </span></td>
<td style="width: 196px;"><input name="login"></td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">Hasło: </span><br
style="font-weight: bold;">
<span style="font-weight: bold;"></span><span
style="font-weight: bold;"></span></td>
<td style="width: 196px;"><input name="haslo"
type="password"></td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">E-Mail: </span><br
style="font-weight: bold;">
<span style="font-weight: bold;"></span><span
style="font-weight: bold;"></span></td>
<td style="width: 196px;"><input name="email"></td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">Kraj: </span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"> </span></td>
<td style="width: 196px;">
<select name="kraj">
<option disabled="disabled" selected="selected">-</option>
<option value="polska">Polska</option>
<option value="usa">U.S.A</option>
<option></option>
</select>
</td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">Lotnisko: </span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"> </span></td>
<td style="width: 196px;">
<select name="lotnisko">
<option disabled="disabled" selected="selected">-</option>
</select>
</td>
</tr>
</tbody>
</table>
<table style="text-align: left; width: 336px; height: 94px;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">Imię: </span><span
style="font-weight: bold;"> </span></td>
<td style="width: 196px;"><input name="imie"></td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><span
style="font-weight: bold;"></span><span
style="font-weight: bold;"></span><span
style="font-weight: bold;">Avatar: </span></td>
<td style="width: 196px;">
<select name="avatar">
<option disabled="disabled" selected="selected">-</option>
<option>aa</option>
</select>
</td>
</tr>
<tr>
<td style="width: 120px; text-align: right;"><input
value="Zarejestruj" type="submit"></td>
<td style="width: 196px;"><input value="Reset"
type="reset"></td>
</tr>
</tbody>
</table>
</form>
';
}
else{
echo'Rejestracja wyłączona!<br>'; }
if($_POST['login'] = ""){echo'Podaj Login<br><br><a href="javascript:history.go(-1)">Wróć</a>';} if($_POST['haslo'] = ""){echo'Podaj Hasło<br><br><a href="javascript:history.go(-1)">Wróć</a>';} if($_POST['email'] = ""){echo'Podaj E-Mail<br><br><a href="javascript:history.go(-1)">Wróć</a>';} if($_POST['kraj'] = "-"){echo'Wybież Kraj<br><br><a href="javascript:history.go(-1)">Wróć</a>';} if($_POST['lotnisko'] = "-"){echo'Wybierz Lotnisko<br><br><a href="javascript:history.go(-1)">Wróć</a>';} if($_POST['imie'] = ""){echo'Podaj Imie<br><br><a href="javascript:history.go(-1)">Wróć</a>';}
if($_POST['login'] = "") or ($_POST['haslo'] = "") or ($_POST['email'] = "") or ($_POST['kraj'] = "-") or ($_POST['lotnisko'] = "-") or ($_POST['imie'] = ""){
}
if($_POST['login']){
$zapytanie = "SELECT `login` FROM `user` WHERE `login`='.$_POST['login'].'";
echo'User o podanym loginie już istnieje w bazie danych!<br>Wybież inny<br><br><a href="javascript:history.go(-1)">Wróć</a>'; }
if($_POST['email']){
$zapytanie = "SELECT `email` FROM `user` WHERE `email`='.$_POST['email'].'";
echo'Taki e-mail już istnieje w bazie danych.<br><br><a href="javascript:history.go(-1)">Wróć</a>'; }
if($_POST['login']) or ($_POST['email']){
}
if($rejestracja = "TAK"){
if(?cmd=zarejestruj&dalej){
//dodanie usera
$zapytanie = "INSERT INTO `user` (`id`, `login`, `haslo`, `email` , `kraj`, `imie`, `avatar`) VALUES ('', '.$_POST['login'].', '.$_POST['haslo'].', '.$_POST['email'].', '.$_POST['kraj'].', '.$_POST['imie'].', '.$_POST['avatar'].')";
//dodanie reszty danych
$zapytanie1 = "INSERT INTO `profil` (`id`, `kasa`, `samoloty`, `lotniska` , `klienci`) VALUES ('', '.$kasa.', '.$samolot.', '.$_POST['lotnisko'].', '0')";
$zapytanie2 = "INSERT INTO `sprzet` (`id`, `mikrofon`, `radar`, `komputer` ) VALUES ('', 'Standard', 'Standard', 'Standard')";
echo'Rejestracja zakończona!<br>Teraz możesz się zalogować.<br>';
}else{echo'Nie moge cię zarejestrować!<br><br><a href="javascript:history.go(-1)">Wróć</a>';} }else{echo'Rejestracja została wyłączona!!<br>';} ?>
Plik: config.php<?
$rejestracja = "TAK";
?>
<?
//dane
$kasa = "100000000000";
$samolot = "B747";
?>
Jesli cos jest zle to poprawcie i opiszcie gdzie i czemu akorat tak.