Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 16:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Register Script [HELP]

Discussion on Register Script [HELP] within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2009
Posts: 58
Received Thanks: 3
Question Register Script [HELP]

Register.php
PHP-Code:

<?php
require('./configs/reg_conf.php');
function doesUsernameExist($name){
$exit = FALSE;
$result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
if (mssql_num_rows($result) != 0){
$exit = TRUE;
}
return $exit;
}

if(isset($_POST['submit'])){
$user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
$pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
if($_POST['username'] == ""){
echo '<font color="red">Enter a user.</font><br /><br />';
}
else if($_POST['password'] == ""){
echo '<font color="red">Enter a password.</font><br /><br />';
}
else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
}
else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
}
else if($_POST['username'] != $user){
echo '<font color="red">User with invalid characters.</font><br /><br />';
}
else if($_POST['password'] != $pass){
echo '<font color="red">Password with invalid characters.</font><br /><br />';
}
else {
$pass = md5('kikugalanet' . $pass);
if(!doesUsernameExist($user)){
$stmt = mssql_init('webCreateAcc', $link);
mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);
mssql_bind($stmt, '@birthday', $bday, SQLVARCHAR, false, false, 120);
mssql_free_statement($stmt);
echo '<font color="Green">Register Successfull.</font><br /><br />';
}
else {
echo '<font color="red">User already Exist.</font><br /><br />';
}
}
mssql_close();
}

echo '<form action="#" method="post">';
echo 'Username: <input type="text" name="username" /><br />';
echo 'Password: <input type="password" name="password" /><br />';
echo 'Birthday: <input type="birthday" name="birthday" /><br />';
echo '<input type="submit" name="submit" value="Register" />';
echo '</form>';

?>

configs/function.php
PHP-Code:


<?php

function exist($account){
$sql = "SELECT * FROM ACCOUNT_TBL WHERE account='".$account."'";
$result = mssql_query($sql);
if(!$result) {
die("MSSQL Error");
}
$check = mssql_num_rows($result);
return $check;
}

function existip($ip){
$sql = "SELECT * FROM ACCOUNT_TBL_DETAIL WHERE ip='".$ip."'";
$result = mssql_query($sql);
if(!$result) {
die("MSSQL Error");
}
$check = mssql_num_rows($result);
return $check;
}

?>
configs/reg_conf.php
PHP-Code:

<?php
$link = @mssql_connect("PCNAMESQLEXPRESS", "sa", "PASSWORT") or die ("Server is down!");
$db = @mssql_select_db('ACCOUNT_DBF') or die ("Accout table is missing!");
$b = '';
$mail = '';


?>

So Das Script habe ich :>
Problem ist nur: WIE binge ich es zum laufen?
Ich muss doch eig nur bei der Reg_conf die 2 sachen da einfügen oder? Also SQL ding und SQL PW oder doch mehr? Helft mir büdde :>
Xadasa is offline  
Old 09/12/2010, 14:31   #2
 
nero55's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 100
Received Thanks: 20
nero55 is offline  
Old 09/12/2010, 14:48   #3
 
KohLix3's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 423
Received Thanks: 64
Du musst in der reg_conf.php bei @mssql_connect("PCNAMESQLEXPRESS")... das alles eintragen. Mehr ist das nicht. Und einfach bei Xampp etc. laufen lassen.
KohLix3 is offline  
Old 09/12/2010, 14:53   #4
 
~Blackout~'s Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 285
Received Thanks: 95
und die php.ini editieren
~Blackout~ is offline  
Old 09/12/2010, 16:18   #5
 
elite*gold: 0
Join Date: Jun 2009
Posts: 58
Received Thanks: 3
1. ÜBER XAMPP?!?! Geht das nicht über nen normalen Webspace?
2. php.ini?!? woher? XD was das?
Xadasa is offline  
Old 09/13/2010, 18:05   #6
 
elite*gold: 59
Join Date: Aug 2009
Posts: 1,586
Received Thanks: 489
Hamachi oder Root server? ^^
.Tear is offline  
Reply


Similar Threads Similar Threads
Register Script
08/30/2010 - Flyff Private Server - 10 Replies
Liebe Elitepvpers, Versuche schon seit einiger Zeit ein Register Script auf die Flyff Pserver HP einzubinden(Offi V14), aber immer wenn ich auf "Account erstellen" klicke, kommt dieser Fehler: Hier die register.php(angegebene Zeile markiert): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans itional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;...
Register Script
04/27/2010 - EO PServer Hosting - 19 Replies
Here is a register script. Just extract this to your www folder. Only edit the config.php. All the instructions are inside of config.php. And for register page to work you have to run apache. If CAPTCHA dont work got to your apache folder and replace the php.ini with this one. Then go to task manager and end all apache processes. Then re-run apache, and you will get about 6 errors, just press ok on them. Its supposed to happen. Oh and if your a new and dont know how to get to...
Register-Script
01/17/2010 - Metin2 Private Server - 0 Replies
Hi, ich suche nach einem relativ speziellen Script. Ein Register-Script, welches ich auf meiner Homepage via Iframe einbauen kann und von dort aus nutzen kann. Ich verwende kein Hamachi sondern DynDNS! Das Script soll kein Design enthalten, je einfacher desto besser. Wenn jemand ein solches Script hat und mir zur Verfügung stellt, wäre ich ihm sehr dankbar. MfG,
[HELP]Register Script
12/30/2009 - EO PServer Hosting - 17 Replies
Hello Community ... I have an problem with register script I don't know where is www folder lol I must download something ?? Please anyone can help me ! Thanks
[Help]TQ register script
01/13/2009 - CO2 Private Server - 2 Replies
Hello, i need register script on php. I use TQ Files. Thanks for help



All times are GMT +2. The time now is 16:15.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.