SMF Fórumba Metin 2 Regisztrálcios oldal integrálás saját kóddal Mosolyog
Hirekbe:
<form action="OK.php" method="post">
<table width="450" border="0">
<tr>
<td width="150">Felhasználonév:
<td width="300"><input type="text" name="username" size="60" />
</tr><tr>
<td width="150">Jelszo:
<td width="300"><input type="password" name="password" size="60" />
</tr><tr>
<td width="150">Neved:
<td width="300"><input type="text" name="rl_name" size="60" />
</tr><tr>
<td width="150">E-Mail:
<td width="300"><input type="text" name="email" size="60" />
</tr><tr>
<td width="150">Törlökod:
<td width="300"><input type="text" name="code" size="60" />
</tr>
</table>
<input type="submit" name="submit" value="Register" />
</form>
OK.php ba:
<?php
include('config.php');
$dbname = "account";
mysql_connect($dbhost, $dbuser, $dbpw) OR
die("Nem sikerült kapcsolódni az adatbázishoz: ".mysql_error());
mysql_select_db($dbname) OR
die("Adatbázis nem található: ".mysql_error());
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$rlname = mysql_real_escape_string($_POST['rl_name']);
$email = mysql_real_escape_string($_POST['email']);
$code = $_POST['code'];
$sql = "INSERT INTO account SET login = '".$username."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."', social_id = '".$code."'";
$result = mysql_query($sql);
if($result) { header('Location: ../index.php'); } else { echo 'NOT'; }
}
?>
config.php ba:
<?php
$serverip = 'szerver ip cimed';
$dbhost = 'mysql szerver ip cimed';
$dbuser = 'mysql felhasználó';
$dbpw = 'mysql jelszó';
?>
Kész is Vigyorog
Copyed from: GhostAttila
Do voltam
Hozzáadva (2011-01-16, 2.51.50)
---------------------------------------------
úgy gondoltam ennyivel tartozok