Offi Files Registerscript.

    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • [FONT="Tahoma"][COLOR="DarkOrange"][SIZE="2"]

      despiteous;60375 schrieb:

      Nein , wenn man darüber bisschen denken würde , würde es einem leicht fallen zu sagen dass es das nicht ist denn
      1. Würde Fame über sich nie aussagen dass Fame "gay" ist
      2. Wäre es länger als "sunkist".
      3. Ist es:

      Quellcode

      1. fameguy


      Wir reden gerade nicht über die Sunkist/Fame Methode sondern den Md5 Hash :D

      Denk du vielleicht erst nach!
      [/SIZE][/COLOR][/FONT]
    • [FONT="Tahoma"][COLOR="DarkOrange"][SIZE="2"]

      Nydn;67827 schrieb:

      [FONT="Arial"][COLOR="Teal"][SIZE="2"][B]

      PHP-Quellcode

      1. $error = '<font color="green">Dein Account Wurde erstellt</font>';

      Das is glaub auch falsch

      Nydn;67827 schrieb:

      [/SIZE][/COLOR][/FONT]


      Nein das ist eig richtig.
      Besser wäre natürlich noch anzugeben das eventuell kein Passwort eingegeben wurde.[/B][/SIZE][/COLOR][/FONT]
    • So hab das Script jetzt geändert das es funktioniert:

      PHP-Quellcode

      1. <?php
      2. ini_set('display_errors', 0);
      3. $connection = mssql_connect('DENNIS-PC\SQLEXPRESS', 'sa', 'hier euer passwort plz rein');
      4. if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
      5. {
      6. die('Konnte keine verbindung zum MSSQL Server herstellen');
      7. }
      8. $checkusername = $_POST['Username'];
      9. $query = mssql_query("SELECT account FROM ACCOUNT_DBF WHERE account = '$checkusername'");
      10. $result = mssql_fetch_row($query);
      11. if(isset($_POST['submit'])){
      12. if($_POST['Username'] == ""){
      13. $error = '<font color="red">Bitte gib deinen Accountnamen an.</font>';
      14. }
      15. else if($result[0] == $checkusername){
      16. $error = '<font color="red">Dein Accountsname ist bereits vergeben.</font>';
      17. }
      18. else if($_POST['Password'] == ""){
      19. $error = '<font color="red">Bitte ein Passwort eingeben.</font>';
      20. }
      21. else if($_POST['Password2'] == ""){
      22. $error = '<font color="red">Du hast kein Passwort angegeben.</font>';
      23. }
      24. else if($_POST['Password'] != $_POST['Password2']){
      25. $error = '<font color="red">Deine Passwörter stimmen nicht ün</font>';
      26. }
      27. else if($_POST['birthday'] == ""){
      28. $error = '<font color="red">Bitte gib dein Geburtsdatum an.</font>';
      29. }
      30. else if($_POST['mail'] == ""){
      31. $error = '<font color="red">BItte gib deine E Mail Adresse an.</font>';
      32. }
      33. else{
      34. $password = md5('kikugalanet' . $_POST['Password']);
      35. $stmt = mssql_init('webCreateAcc', $connection);
      36. mssql_bind($stmt, '@account', $checkusername, SQLVARCHAR, false, false, 15);
      37. mssql_bind($stmt, '@password', $password, SQLVARCHAR, false, false, 36);
      38. mssql_bind($stmt, '@birthday', $_POST['birthday'], SQLVARCHAR, false, false, 120);
      39. mssql_bind($stmt, '@email', $_POST['mail'], SQLVARCHAR, false, false, 120);
      40. mssql_execute($stmt) or die ("Could not complete the registration. Please try again.");
      41. mssql_free_statement($stmt);
      42. $error = '<font color="green">Dein Account Wurde erstellt</font>';
      43. }
      44. }
      45. echo '<form action="register.php" method="post">';
      46. echo 'Account:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="Username" /><br /><br />';
      47. echo 'Passwort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="Password" /><br /><br />';
      48. echo 'Passwort wiederholen: <input type="password" name="Password2" /><br /><br />';
      49. echo 'Geburtsdatum: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="birthday" /><br /><br />';
      50. echo 'E-mail Adresse: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="mail" /><br />';
      51. echo '<input type="submit" name="submit" value="Registrieren" />';
      52. echo '</form>';
      53. echo $error;
      54. ?>
      Alles anzeigen


      Wenn ich euch geholfen habe, plz ein thx geben xD
    • dennisdra;75557 schrieb:

      So hab das Script jetzt geändert das es funktioniert:

      PHP-Quellcode

      1. <?php
      2. ini_set('display_errors', 0);
      3. $connection = mssql_connect('DENNIS-PC\SQLEXPRESS', 'sa', 'hier euer passwort plz rein');
      4. if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
      5. {
      6. die('Konnte keine verbindung zum MSSQL Server herstellen');
      7. }
      8. $checkusername = $_POST['Username'];
      9. $query = mssql_query("SELECT account FROM ACCOUNT_DBF WHERE account = '$checkusername'");
      10. $result = mssql_fetch_row($query);
      11. if(isset($_POST['submit'])){
      12. if($_POST['Username'] == ""){
      13. $error = '<font color="red">Bitte gib deinen Accountnamen an.</font>';
      14. }
      15. else if($result[0] == $checkusername){
      16. $error = '<font color="red">Dein Accountsname ist bereits vergeben.</font>';
      17. }
      18. else if($_POST['Password'] == ""){
      19. $error = '<font color="red">Bitte ein Passwort eingeben.</font>';
      20. }
      21. else if($_POST['Password2'] == ""){
      22. $error = '<font color="red">Du hast kein Passwort angegeben.</font>';
      23. }
      24. else if($_POST['Password'] != $_POST['Password2']){
      25. $error = '<font color="red">Deine Passwörter stimmen nicht ün</font>';
      26. }
      27. else if($_POST['birthday'] == ""){
      28. $error = '<font color="red">Bitte gib dein Geburtsdatum an.</font>';
      29. }
      30. else if($_POST['mail'] == ""){
      31. $error = '<font color="red">BItte gib deine E Mail Adresse an.</font>';
      32. }
      33. else{
      34. $password = md5('kikugalanet' . $_POST['Password']);
      35. $stmt = mssql_init('webCreateAcc', $connection);
      36. mssql_bind($stmt, '@account', $checkusername, SQLVARCHAR, false, false, 15);
      37. mssql_bind($stmt, '@password', $password, SQLVARCHAR, false, false, 36);
      38. mssql_bind($stmt, '@birthday', $_POST['birthday'], SQLVARCHAR, false, false, 120);
      39. mssql_bind($stmt, '@email', $_POST['mail'], SQLVARCHAR, false, false, 120);
      40. mssql_execute($stmt) or die ("Could not complete the registration. Please try again.");
      41. mssql_free_statement($stmt);
      42. $error = '<font color="green">Dein Account Wurde erstellt</font>';
      43. }
      44. }
      45. echo '<form action="register.php" method="post">';
      46. echo 'Account:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="Username" /><br /><br />';
      47. echo 'Passwort:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="Password" /><br /><br />';
      48. echo 'Passwort wiederholen: <input type="password" name="Password2" /><br /><br />';
      49. echo 'Geburtsdatum: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="birthday" /><br /><br />';
      50. echo 'E-mail Adresse: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="mail" /><br />';
      51. echo '<input type="submit" name="submit" value="Registrieren" />';
      52. echo '</form>';
      53. echo $error;
      54. ?>
      Alles anzeigen


      Wenn ich euch geholfen habe, plz ein thx geben xD



      bei mir ist die seite weiß :(