register.php
<? include('functions.php'); include('header.php'); list($startingcash, $signups, $running) = getGameInfo();?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <script src="md5.js"></script> <script language="JavaScript"> function encrypt2() { var s = document.reg.Password1show.value; var s = hex_md5(s); document.reg.Password1.value = s; var s = document.reg.Password2show.value; var s = hex_md5(s); document.reg.Password2.value = s; } </script> <title>Dragster</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="container"> <div id="header"> <h1><a href="home.html"><span>Throttle - Win or Crash</span></a></h1> </div> <div id="sidebar-left"> <h2 id="crew"><span>The Crew</span></h2> <?PHP include('login.php'); ?> </div> <div id="main"> <h2 id="content"><span>content panel</span></h2> <?PHP if ($signups!="1") { echo("<p><font face='Arial, Helvetica, sans-serif' size='2'><b>Sorry but sign-ups are currently closed. Please come back again.</b></font></p>"); } else if($running!="1") { echo("<p><font face='Arial, Helvetica, sans-serif' size='2'><b>Sorry but the game is currently down for maintance. Please come back again.</b></font></p>"); } else { ?> <FORM ACTION="reg.php" METHOD="POST" NAME="reg"> Login:<BR> <INPUT TYPE="text" NAME="Username"><BR> Hasło:<BR> <INPUT TYPE="password" NAME="Password1show"><BR> Powtórz hasło:<BR> <INPUT TYPE="password" NAME="Password2show"><BR> Adres email:<BR> <INPUT TYPE="text" NAME="email"><br> <INPUT TYPE="hidden" NAME="Password1"> <INPUT TYPE="hidden" NAME="Password2"> <INPUT TYPE="submit" NAME="submit" VALUE="Rejestruj" onClick="encrypt2()"> </FORM> <? } ?> </div> <div id="footer"> <?PHP include("footer.php"); ?> </div> </div> </body> </html>
a to reg.php
<? include('header.php'); include("functions.php"); $username = $_POST["Username"]; $password1 = $_POST["Password1"]; $password2 = $_POST["Password2"]; $email = $_POST["email"]; connectdb(); if ($username==0 || $password1==0 || $password2==0 || $email==0) { $ico='Musisz wypełnić wszystkie pola!'; } else { if ($password1!=$password2) { $ico='Hasła które podałeś nie są identyczne!'; } else { if ($ml > 0) { $ico='Taki email jest już zarezerwowany!'; } else { if ($gracz > 0) { $ico='Taki login jest już zarezerwowany!'; } else { $query=mysql_query("insert into users (user_id,username,password,email) values ('','$username','$password1','$email')"); $ico='Konto zostało utworzone teraz możesz się zalogować!';  }}}} ?>
I za żadne skarby nie mogę dojść czemu po drodze gubi mi zmienną $email. Pisze ponieważ ja już nie mam pomysłu co tu zepsułem. Może wy znajdziecie błąd. Z góry dziękuę i pozdrawiam.