Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [wolontariat][PHP][MMSQL] Strona rejestracyjna.
Forum PHP.pl > Inne > Giełda ofert > Poszukuję
Cavatina
Witam

Jako iż nie znam się na programowaniu w MMSQL chciałbym prosić o przerobienie mi strony rejestracyjnej do pewnej gry mmo:rpg. Skrypt który zaraz podam jest dla MySQL a ja potrzebuję aby był na MMSQL 2005 ponieważ tego wymaga serwer gry.
Nazwa bazy danej to: ACCOUNT_DBF zaś tabeli która znajduje sie w ów wymienionej bazie to dbo.ACCOUNT_TBL i w niej mają się zapisywać konta.
Nazwy kolumn to: account, password oraz e-mail.

Chciałbym aby wygląd tego skryptu rejestracyjnego wyglądał tak jak na załączonym zdjęciu:

czyli:
Nazwa:
Hasło:
Powtórz hasło:
E-mail:

Oraz ten kod anty boterski.

Chciałbym aby skrypt sprawdzał czy hasła oraz kod z obrazka jest poprawny, jak nie to wygłasza stosowną odpowiedź do uzytkownika oraz aby sprawdzał czy e-mail nie jest już w bazie. Jak jest to aby pisał że 'Wybrany e-mail jest juz w bazie'.


No i to wszystko raczej, jeżeli czegoś nie napisałem to proszę o napisanie czego brakuje a w błyskawicznym tempie odpisze.
Również chciałbym aby dało się to zrobić jak najszybciej, gdyż wszystko już mam gotowe do startu, lecz brakuje tego skryptu do rejestracji konta.

Z góry serdecznie dziękuje i pozdrawiam.



config.php
  1. <?php
  2. if(stristr($_SERVER['PHP_SELF'], "config.php")) die('asdada');
  3. $host = "localhost"; // host mysql
  4. $user = "root"; // mysql username
  5. $pass = "acesso"; // mysql password
  6. $db = "flyff"; // mysql db
  7.  
  8. mysql_connect($host,$user,$pass) or die(mysql_error());
  9.  
  10. function nw($N, $C){
  11. $reg = mysql_query("INSERT INTO accounts (username, password, accesslevel) VALUES( '$N', '$C', '1')")or die(mysql_error());
  12. return $reg;
  13. }
  14. function exi($user){
  15. $check = mysql_query("SELECT * FROM accounts WHERE username = '$user'");
  16. $check2 = mysql_num_rows($check);
  17. return $check2;
  18. }
  19.  
  20. ?>


index.php
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>WEB SITE - FLYFF SERVER </title>
  6. <?php
  7. require('config.php');
  8. ?>
  9.  
  10. <style type="text/css">
  11. <!--
  12. body,td,th {
  13. font-family: Geneva, Arial, Helvetica, sans-serif;
  14. font-size: 12px;
  15. color: #FFFFFF;
  16. }
  17. body {
  18. margin-left: 0px;
  19. margin-top: 0px;
  20. margin-right: 0px;
  21. margin-bottom: 0px;
  22. background-color: #666666;
  23. background-image: url(03_1024.jpg);
  24. }
  25. .style1 {
  26. font-size: 16px;
  27. font-weight: bold;
  28. }
  29. .style2 {
  30. font-size: 14px;
  31. font-weight: bold;
  32. }
  33. .style3 { font-family: Geneva, Arial, Helvetica, sans-serif;
  34. font-weight: bold;
  35. }
  36. -->
  37. </style></head>
  38.  
  39. <body>
  40. <div align="center">
  41. <table width="1000" border="0" cellpadding="0" cellspacing="0">
  42. <tr>
  43. <td colspan="10">&nbsp;</td>
  44. </tr>
  45. <tr>
  46. <td colspan="10"><div align="center" class="style1">WEB SITE 1.0 - FLYFF SERVER </div></td>
  47. </tr>
  48. <tr>
  49. <td colspan="10"><div align="center"><strong>For Privates Servers </strong></div></td>
  50. </tr>
  51. <tr>
  52. <td colspan="10"><div align="center">Credits: </div></td>
  53. </tr>
  54. <tr>
  55. <td colspan="10">&nbsp; </td>
  56. </tr>
  57.  
  58. <tr>
  59. <td colspan="3"><div align="center"></div></td>
  60. <td colspan="4" rowspan="15" valign="top"><div align="center">
  61. <p align="center" class="style3"><span class="b01"><strong>Create Account </strong></span><br />
  62. </p>
  63. <form action="?op=register" method="post">
  64. <table width="258" border="0" align="center">
  65. <tr>
  66. <td width="107" height="20" class="b01"><strong>Login:</strong></td>
  67. <td width="141"><label>
  68. <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
  69. </label></td>
  70. </tr>
  71. <tr>
  72. <td height="25" class="b01"><strong>Password:</strong></td>
  73. <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
  74. </tr>
  75. <tr>
  76. <td height="24" class="b01"><strong>Repeat Password: </strong></td>
  77. <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
  78. </tr>
  79. </table>
  80. <p align="center">
  81. <input name="submit" type="submit" class="liteoption" value="Create Account" />
  82. </p>
  83. </form>
  84. <div align="center">
  85. <?php
  86. if(isset($_POST['submit'])) {
  87. if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
  88. die('<strong>You must fill in all of the feilds!!!<BR></strong>');
  89. }
  90. else {
  91. $user = $_POST['user'];
  92. $pass = md5('kikugalanet' .$_POST['pass1']. '');
  93. }
  94. $pass2 = md5('kikugalanet' .$_POST['pass2']. '');
  95. if(exi($user) != '0') {
  96. die("Username: '".$user."' is in use!");
  97. }
  98. if($pass != $pass2) {
  99. die('<strong>Passwords dont match!</strong>');
  100. }
  101. $nww = nw($user, $pass);
  102. if ($nww){
  103. echo("<p class='b01'><strong>Registration Complete!</strong></p>");
  104. }else {
  105. echo("<p class='b01'><strong>Registration Failed!</strong></p>");
  106. }}
  107. ?>
  108. </div>
  109. <p>&nbsp;</p>
  110. </div></td>
  111. <td width="141">&nbsp;</td>
  112. <td width="10">&nbsp;</td>
  113. <td width="128">&nbsp;</td>
  114. </tr>
  115. <tr>
  116. <td colspan="3"><div align="center" class="style2">Server Status </div></td>
  117. <td colspan="3"><div align="center"><span class="style2">Server INFO </span></div></td>
  118. </tr>
  119. </table>
  120. </div>
  121. </body>
  122. </html>
nospor
chciałbym...
chciałbym...
dużo tych chciałbym....

A ja chciałbym by użytkownicy zakładali tematy we właściwych działach winksmiley.jpg

przenosze
prachwal
http://www.phpcaptcha.org
php captcha - magiczne słowa dla googl-a
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.