witam mam maly problem a mianowice chce aby w skrypcie rejestracji bylo wiecej pol ktore musi wypelnic nowy user a zrobilem to tak
  1. <?php
  2. require("./CustomSql.inc.php");
  3. $db = new CustomSQL($DBName);
  4. $showtable = true;
  5. $errortag = false;
  6. if (!empty($adduser)) {
  7.    
  8. if (empty($username)){
  9.     $errortag = true;
  10.     $errormsg = $error_usernameempty;
  11. }
  12.  
  13. if (empty($password)){
  14.     $errortag = true;
  15.     $errormsg = $error_passwordempty;
  16. }
  17.  
  18. if (empty($email)){
  19.     $errortag = true;
  20.     $errormsg = $error_emailempty;
  21. }
  22.  
  23. $usernamecheckresult = $db->checkusername($username);
  24. if (!empty($usernamecheckresult)) {
  25.     $errortag = true;
  26.     $errormsg = $error_userexist;
  27. }
  28.  
  29. if ($password!=$passretype){
  30.     $errortag = true;
  31.     $errormsg = $error_passretypewrong;
  32. }
  33.  
  34. if (!ereg("@", $email)) {
  35.     $errortag = true;
  36.     $errormsg = $error_email;
  37.     if (empty($homepage)){
  38.     $errortag = true;
  39.     $errormsg = $error_imie;
  40. }
  41. if (empty($icq)){
  42.     $errortag = true;
  43.     $errormsg = $error_surname;
  44. }
  45. if (empty($aol)){
  46. if (is_int($aol)) {
  47.     $errortag = true;
  48.     $errormsg = $error_numer;
  49. }
  50. }
  51. if (empty($occupation)){
  52.     $errortag = true;
  53.     $errormsg = $error_miasto;
  54. }
  55. if (empty($interests)){
  56.     if (is_int($interests)) {
  57.     $errortag = true;
  58.     $errormsg = $error_pocztowy;
  59. }
  60. }
  61. if (empty($emailretype)){
  62.     $errortag = true;
  63.     $errormsg = $error_emailretypewrong;
  64. }
  65. if (empty($biography)){
  66.     $errortag = true;
  67.     $errormsg = $error_ulica;
  68. }
  69. }
  70.  
  71. if (!$errortag){
  72.     $customerid = $db->adduser($username,$password,$email,$homepage,$icq,$aol,$yahoo,$msn,$location,$occupation,$interests,$biography);
  73.     $showtable = false;
  74.    
  75.     $content = "
  76.     Login : $username
  77.     Haslo : $password
  78.     Imie : $homepage
  79.     Nazwisko : $icq
  80.     Nr telefonu : +48 $aol
  81.     Login Allegro.pl : $yahoo
  82.     Kraj : Polska
  83.     Wojewodztwo : $location
  84.     Miasto : $occupation
  85.     Kod pocztowy : $interests
  86.     Ulica nr domu : $biography
  87. ?>


druga czesc
  1. Dziekuje za wybranie mojego serwisu. Pozdrawiam Michu.
  2.      ";
  3.      $adresat = 'michu9010@tlen.pl, ';     // pod ten adres zostanie wyslana                             // wiadomosc
  4.      @$email = $_POST['email'];
  5.      $header =     "From: michu9010@tlen.pl \nContent-Type:".
  6.              ' text/plain;charset="iso-8859-2"'.
  7.              "\nContent-Transfer-Encoding: 8bit";
  8.      if (mail($adresat, 'List ze strony Mdesign - Rejestracja', $content, $header))
  9.      echo "Zostales zarejestrowany. Dziekuje ;) ";
  10.  
  11.      echo "Zostales zarejestrowany./n";
  12.  echo "<script>setTimeout('document.location = \"login.php\"', 1000);</script>";
  13.  }
  14.  
  15.  }
  16.  
  17.  
  18.  
  19.  ?>
  20.  <?php
  21.  include("top.php3");
  22.  ?>
  23.      <table border="0" cellspacing="0" cellpadding="4" width="" id="tabele">
  24.          <tr>
  25.            <td width="468" class="menu_in">::<?php print "$front_registration"; ?><br>
  26.            &nbsp;&nbsp;&nbsp;<font color="#FF0000">*</font>&nbsp;<?php print "$front_requiredinfo"; ?> <br><font color="#FF0000">**</font> <?php print "$front_ob_disable"; ?></td>
  27.        </tr>
  28.          <?php
  29.          if ($errortag){
  30.          ?>
  31.          <tr>
  32.            <td><font color="#FF0000"><?php print "$errormsg"; ?></font></td>
  33.          </tr>
  34.          <?php
  35.          }
  36.          ?>
  37.          <tr>
  38.            <td>  
  39.            <?php
  40.            if ($showtable){
  41.            ?>                  
  42.  <form action="<?php print "$PHP_SELF"; ?>" method="POST">
  43.  <table width="485" border=0 cellpadding=2 cellspacing=2 id="tabele">
  44.  <tr><td width="232"><?php print "$front_username"; ?> : </td>
  45.  <td width="222"><input type="text" name="username" value="<?php print "$username"; ?>">&nbsp;<font color="#FF0000">*</font></td></tr>
  46.  <tr><td><?php print "$front_password"; ?> : </td><td><input type="password" name="password" value="">&nbsp;<font color="#FF0000">*</font></td></tr>
  47.  <tr><td><?php print "$front_passwordagain"; ?> : </td><td><input type="password" name="passretype" value="">&nbsp;<font color="#FF0000">*</font></td></tr>
  48.  <tr><td><?php print "$front_email"; ?> : </td><td><input type="text" name="email" value="<?php print "$email"; ?>">&nbsp;<font color="#FF0000">*</font></td></tr>
  49.  <tr><td><?php print "$front_emailagain"; ?> : </td><td><input type="text" name="emailretype" value="">&nbsp;<font color="#FF0000">*</font></td></tr>
  50.  <tr><td><?php print "$front_user_name"; ?> : </td><td><input type="text" name="homepage">
  51.    <span class="style1">**</span></td>
  52.  </tr>
  53.  <tr><td><?php print "$front_surname"; ?> : </td><td><input type="text" name="icq">
  54.    <span class="style1">**</span></td>
  55.  </tr>
  56.  <tr><td><?php print "$front_numer"; ?> : +48</td>
  57.    <td>
  58.    <input type="text" name="aol">
  59.   <span class="style1"> **</span></td>
  60.  </tr>
  61.  <tr><td><?php print "$front_allegro"; ?> : </td><td><input type="text" name="yahoo" value="" ></td></tr>
  62.  <tr><td><?php print "$front_kraj"; ?> : </td><td><input type="text" name="msn" value="Polska">
  63.    <span class="style1">**</span></td>
  64.  </tr>
  65.  <tr><td><?php print "$front_woj"; ?> : </td><td><select name="location" value="<?php print "$location"; ?>">
  66.  <option>dolnoslaskie</option>
  67.  <option>kujawsko-pomorskie</option>
  68.  <option>lubelskie</option>
  69.  <option>lubuskie</option>
  70.  <option>lódzkie</option>
  71.  <option>malopolskie</option>
  72.  <option>mazowieckie</option>
  73.  <option>opolskie</option>
  74.  <option>podkarpackie</option>
  75.  <option>podlaskie</option>
  76.  <option>pomorskie</option>
  77.  <option>slaskie</option>
  78.  <option>swietokrzyskie</option>
  79.  <option>warminsko-mazurskie</option>
  80.  <option>wielkopolskie</option>
  81.  <option>zachodniopomorskie</option>
  82.  </select>
  83.  
  84.  
  85.    <span class="style1">**</span></td>
  86.  </tr>
  87.  <tr><td><?php print "$front_miasto"; ?> : </td><td><input type="text" name="occupation">
  88.    <span class="style1">**</span></td>
  89.  </tr>
  90.  <tr><td><?php print "$front_pocztowy"; ?> : </td><td><input type="text" name="interests">
  91.    <span class="style1">**</span></td>
  92.  </tr>
  93.  <tr><td><?php print "$front_ulica"; ?> : </td><td><input type="text" name="biography">
  94.    <span class="style1">**</span></td>
  95.  </tr>
  96.  <tr><td></td><td><input type="submit" name="adduser" value="<?php print "$front_regsubmit"; ?>"></td></tr>
  97.  </table>
  98.  </form>    
  99.            <?php
  100.            }
  101.            ?>
  102.            </td>
  103.          </tr>
  104.          <tr>
  105.            <td align="center"><a href="login.php"><?php print "$front_login"; ?></a></td>
  106.          </tr>
  107.        </table>
  108.  
  109.  <?php
  110.  include("bottom.php3");
  111.  ?>


ale nie sprawdza tych pol tylko odrazu dodaje do bazy nie wiem jak to przeksztalcic pomozcie sciana.gif rolleyes.gif