This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: PHP  |  size: 1.32 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. include("config.php");
  3. include ("database.php");
  4. session_start();
  5.  
  6. ?>
  7.  
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  12. <title><?php $title ?></title>
  13. </head>
  14. <body>
  15.  
  16. <form action="register.php" method="post">
  17. <p>Benutzername:<br/>
  18. <input name="username" type="text" maxlength="20"></p>
  19.  
  20. <p>E-Mail:<br/>
  21. <input name="mail" type="text"></p>
  22.  
  23. <p>Passwort:<br/>
  24. <input name="passwort" type="password"></p>
  25. <p>Passwort wiederholden: <br/>
  26. <input name="passwort2" type="password"></p>
  27. <p>
  28. <input name="submit" type="submit" value="Registrieren"></p>
  29.  
  30. </form>
  31.  
  32. </body>
  33. </html>
  34.  
  35.  
  36.  
  37.  
  38. <?php
  39.  
  40.  
  41.  
  42. if(isset($_POST['submit']))
  43.  
  44. {
  45.  
  46. if(empty($_POST['username']) or empty($_POST['mail']) or empty($_POST['passwort']) or empty($_POST['passwort2']))
  47. {
  48.         echo '<script type="text/javascript">;alert("Bitte alle Felder ausf├╝llen!")</script>';
  49. }
  50.  
  51. else
  52.  
  53. {
  54.  
  55. $username = $_POST['username'];
  56. $passwort = $_POST['passwort'];
  57. $passwort2 = $_POST['passwort2'];
  58. $mail = $_POST['mail'];
  59.  
  60.  
  61. $mysqladduser = mysql_query("INSERT INTO users(username, passwort, mail,ip) VALUES ('$username' , '$passwort' , '$mail', '$ip')");
  62. header ("Location: ".$pfad."erfolg.php");}
  63.  
  64. }
  65.  
  66. ?>
clone this paste RAW Paste Data