Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem php - vycentrovani tabulky

diky lose ,ale ted me zarazilo kam to mam dat ... :D

davam sem kod a ty mi napis kam to mam dat . :) dik

<?php
  mysql_pconnect('fdb3.runhosting.com', '****', '****');
?>

<html>
  <head>
    <title>PHP Tutorials</title>
   </head>
<body>
  <?php
    if ( !$_POST['submit'] ) { 
  ?>
    <form action="index.php" method="post">
      <table border="1">
        <tr>
          <td>
            Username:
           </td>
          <td>
            <input type="text" name="username">
           </td>
         </tr>
        <tr>
          <td>
            Password:
           </td>
          <td>
            <input type="password" name="password">
           </td>
         </tr>
        <tr>
          <td>
            Password (Confrim):
           </td>
          <td>
            <input type="password" name="passwordconf">
           </td>
         </tr>
      <tr>
        <td>
          Email:
         </td>
        <td>
          <input type="text" name="email">
         </td>
       </tr>
      <tr>
        <td colspan="2" aling="center">
          <input type="submit" value="Create User" name="submit">
         </td>
       </tr>
     </table>
   </form>
<?php
  } else {
    $username = $_POST['username'];
    $password = $_POST['password'];
    $passwordconf = $_POST['passwordconf'];
    $email = $_POST['email'];   
     
    $errors = array();
   
    if ( !$username ) {
     $errors[1] = "You did not enter a username.";
    }
     
    if ( !$password ) {
     $errors[2] = "You did not enter a password.";
    }
     
    if ( !$passwordconf ) {
     $errors[3] = "You did not enter a password confrimation.";   
    }

    if ( !$email ) {
     $errors[4] = "You did not enter an email.";
    }
     
    if ( $password != $passwordconf ) {
     $errors[5] = "You password you entered did not match.";     
    }
     
     if ( count($errors) > 0 ) {
       foreach ( $errors as $error ) {
         echo "$error<br>";
       }
     } else {
		mysql_query("INSERT INTO `****`.`user_info`
          (`username`, `password`, `email`, `user_admin_level`)
          VALUES ('".$username."', '".md5($password)."', '".$email."', '1') ; ");
      }
    }
  ?>
  </body>
  </html>

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny