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<?php
if(stristr($_SERVER['PHP_SELF'], "config.php")) die('asdada'); $host = "localhost"; // host mysql
$user = "root"; // mysql username
$pass = "acesso"; // mysql password
$db = "flyff"; // mysql db
function nw($N, $C){
return $reg;
}
function exi($user){
$check = mysql_query("SELECT * FROM accounts WHERE username = '$user'"); return $check2;
}
?>
index.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>WEB SITE - FLYFF SERVER </title>
<?php
require('config.php');
?>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #666666;
background-image: url(03_1024.jpg);
}
.style1 {
font-size: 16px;
font-weight: bold;
}
.style2 {
font-size: 14px;
font-weight: bold;
}
.style3 { font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
}
-->
</style></head>
<body>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="10"> </td>
</tr>
<tr>
<td colspan="10"><div align="center" class="style1">WEB SITE 1.0 - FLYFF SERVER </div></td>
</tr>
<tr>
<td colspan="10"><div align="center"><strong>For Privates Servers </strong></div></td>
</tr>
<tr>
<td colspan="10"><div align="center">Credits: </div></td>
</tr>
<tr>
<td colspan="10"> </td>
</tr>
<tr>
<td colspan="3"><div align="center"></div></td>
<td colspan="4" rowspan="15" valign="top"><div align="center">
<p align="center" class="style3"><span class="b01"><strong>Create Account </strong></span><br />
</p>
<form action="?op=register" method="post">
<table width="258" border="0" align="center">
<tr>
<td width="107" height="20" class="b01"><strong>Login:</strong></td>
<td width="141"><label>
<input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
</label></td>
</tr>
<tr>
<td height="25" class="b01"><strong>Password:</strong></td>
<td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
</tr>
<tr>
<td height="24" class="b01"><strong>Repeat Password: </strong></td>
<td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
</tr>
</table>
<p align="center">
<input name="submit" type="submit" class="liteoption" value="Create Account" />
</p>
</form>
<div align="center">
<?php
if(isset($_POST['submit'])) { if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die('<strong>You must fill in all of the feilds!!!<BR></strong>'); }
else {
$user = $_POST['user'];
$pass = md5('kikugalanet' .$_POST['pass1']. ''); }
$pass2 = md5('kikugalanet' .$_POST['pass2']. ''); if(exi($user) != '0') {
die("Username: '".$user."' is in use!"); }
if($pass != $pass2) {
die('<strong>Passwords dont match!</strong>'); }
$nww = nw($user, $pass);
if ($nww){
echo("<p class='b01'><strong>Registration Complete!</strong></p>"); }else {
echo("<p class='b01'><strong>Registration Failed!</strong></p>"); }}
?>
</div>
<p> </p>
</div></td>
<td width="141"> </td>
<td width="10"> </td>
<td width="128"> </td>
</tr>
<tr>
<td colspan="3"><div align="center" class="style2">Server Status </div></td>
<td colspan="3"><div align="center"><span class="style2">Server INFO </span></div></td>
</tr>
</table>
</div>
</body>
</html>
Powód edycji: [nospor]: