Register for your free account! | Forgot your password?

Go Back   elitepvpers > World of Warcraft > WoW Private Server > WoW PServer Hosting
You last visited: Today at 23:26

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

 

PACW - Account creation page Problem

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2009
Posts: 16
Received Thanks: 0
PACW - Account creation page Problem

Hallo, ich versuche grade einwenig PACW so umschreiben, dass er die Accounts auch in meine Datenbank einfügt, er fügt es auch soweit ein, nur ich kann mich dann noch nicht einloggen, er verschlüsselt auch das passwort nicht, weiß jemand wie er es macht und man sich dann einloggen kann?
Code:
<?php
/*********************************************
*   PACW - Pingue Account Creation Website   *
*                 Version: 1.0               *
*            coded by Adam Viðarsson         *
*                                            *
*             http://thepingue.com           *
*                                            *
*********************************************/
	$dbcon = @mysql_connect($dbhost, $dbuser, $dbpass);
	if (!$dbcon)
	{
	  return show_error(mysql_error());
	}
	$dba = @mysql_select_db($dbaccs, $dbcon);
	if (!$dba)
	{
	  return show_error(mysql_error());
	}

$ip = $_SERVER['REMOTE_ADDR'];

if($multi_ip != 1) {
	$query = @mysql_query("SELECT * FROM account WHERE lastip = '$ip'") or die(mysql_error());
	if(mysql_num_rows($query) != 0) {
		return locked_error("You have already used this IP before to register an account.");
	} 
}

echo '<div id="acc">
<h2 align="center">Create an Account</h2><br /><form method="post">Account Name<br /><input type="text" name="accname" /><br /><br />Account Password<br /><input type="password" name="pword" /><br /><br />Retype your Password<br /><input type="password" name="pwordtwo" /><br /><br />E-mail Address (Use a valid E-mail)<br /><input type="text" name="accmail" /><br /><br /><input type="submit" value="" name="submit" /></form>
</div>';

if(isset($_POST['submit'])) {
  if(empty($_POST['accname']) || empty($_POST['pword']) || empty($_POST['pwordtwo']) || empty($_POST['accmail']))
    return show_error("Some fields were empty, please fill in all fields."); 

    if($_POST['pwordtwo'] != $_POST['pword']) return show_error("Your passwords did not match."); 
	if(!is_valid_email($_POST['accmail'])) return show_error("You must use a valid email");
	
    $query1 = @mysql_query("SELECT * FROM account WHERE username = '$_POST[accname]'") or die(mysql_error());
    if(mysql_num_rows($query1) != 0) return show_error("Username already exists in our database.");
    
    $query2 = @mysql_query("SELECT * FROM account WHERE email = '$_POST[accmail]'") or die(mysql_error());
    if(mysql_num_rows($query2) != 0) return show_error("E-mail already exists in our database.");
    
    $query3 = mysql_query("INSERT INTO account SET username = '$_POST[accname]', sha_pass_hash = '$_POST[pword]', email = '$_POST[accmail]'") or die(mysql_error());
    if (mysql_affected_rows($dbcon) <= 0) return show_error("Something went wrong, please try again. Account was not created!");

    echo '<div class="success"><span style="padding-left:35px;">Account successfully created!</span> <div class="s-img"></div></div><br />';
}

?>
mfG

#Push

Spaß ^^

neue bearbeitet
Code:
<?php
/*********************************************
*   PACW - Pingue Account Creation Website   *
*                 Version: 1.0               *
*            coded by Adam Viðarsson         *
*                                            *
*             http://thepingue.com           *
*                                            *
*********************************************/
	$dbcon = @mysql_connect($dbhost, $dbuser, $dbpass);
	if (!$dbcon)
	{
	  return show_error(mysql_error());
	}
	$dba = @mysql_select_db($dbaccs, $dbcon);
	if (!$dba)
	{
	  return show_error(mysql_error());
	}

$ip = $_SERVER['REMOTE_ADDR'];

if($multi_ip != 1) {
	$query = @mysql_query("SELECT * FROM account WHERE lastip = '$ip'") or die(mysql_error());
	if(mysql_num_rows($query) != 0) {
		return locked_error("You have already used this IP before to register an account.");
	} 
}

echo '<div id="acc">
<h2 align="center">Create an Account</h2><br /><form method="post">Account Name<br /><input type="text" name="accname" /><br /><br />Account Password<br /><input type="password" name="pword" /><br /><br />Retype your Password<br /><input type="password" name="pwordtwo" /><br /><br />E-mail Address (Use a valid E-mail)<br /><input type="text" name="accmail" /><br /><br /><input type="submit" value="" name="submit" /></form>
</div>';

if(isset($_POST['submit'])) {
  if(empty($_POST['accname']) || empty($_POST['pword']) || empty($_POST['pwordtwo']) || empty($_POST['accmail']))
    return show_error("Some fields were empty, please fill in all fields."); 

    if($_POST['pwordtwo'] != $_POST['pword']) return show_error("Your passwords did not match."); 
	if(!is_valid_email($_POST['accmail'])) return show_error("You must use a valid email");
	
    $query1 = @mysql_query("SELECT * FROM account WHERE username = '$_POST[accname]'") or die(mysql_error());
    if(mysql_num_rows($query1) != 0) return show_error("Username already exists in our database.");
    
    $query2 = @mysql_query("SELECT * FROM account WHERE email = '$_POST[accmail]'") or die(mysql_error());
    if(mysql_num_rows($query2) != 0) return show_error("E-mail already exists in our database.");
    
    $query3 = mysql_query("INSERT INTO account SET username = '$_POST[accname]', sha_pass_hash = md5('$_POST[pword]'), email = '$_POST[accmail]'") or die(mysql_error());
    if (mysql_affected_rows($dbcon) <= 0) return show_error("Something went wrong, please try again. Account was not created!");

    echo '<div class="success"><span style="padding-left:35px;">Account successfully created!</span> <div class="s-img"></div></div><br />';
}

?>
verschlüsselt jetzt in datenbank, aber man kann immer noch nicht einloggen, jemand ne Idee?



Monti! is offline  
Old   #2
 
elite*gold: 0
Join Date: Mar 2010
Posts: 208
Received Thanks: 83
Ich nicht.
Aber es gibt eine menge Tutorials für funktionierende ACC Creation Pages.
Geh einfach mal Googlen.

MfG Sarumon


Sarumon is offline  
Old   #3
 
elite*gold: 0
Join Date: Dec 2008
Posts: 252
Received Thanks: 44
Kurze Frage:
Seit wann wird das Passwort in MD5 verschlüsselt?

Bei Trinity etc. ist es nämlich so:
$passwort = sha1(strtoupper($benutzer) . ":" . strtoupper($passwort));
$passwort = strtoupper($passwort);

Variablen musst du selber angleichen.
Aber Passwort wird normalerweise in SHA1 verschlüsselt.


€dit1:
Ok was heißt hier "Bei Trinity etc."... Bei Trinity ist das so.
Arcemu verwendet meines Wissen wieder eine andere Verschlüsselung und bei Mangos bin ich mir nicht sicher ob MD5 oder SHA1.
XoreYo is offline  
Old   #4
 
elite*gold: 0
Join Date: Mar 2010
Posts: 208
Received Thanks: 83
Also mein Arcemu kann ich die Passwörter auslesen.
Und bei Mangos und Trinity brauch ich ne ACC Creation Page um einen Account überhaupt anlegen zu können. Und ja Mangos nutzt SHA1 z.m meiner xDDD

MfG Sarumon


Sarumon is offline  
Old   #5
 
elite*gold: 0
Join Date: May 2009
Posts: 16
Received Thanks: 0
Hat sich alles schon erledigt

ja, das mit sha1 war mit klar, habs auch getestet, man konnte sich nur nicht einloggen klappt aber jetzt

bitte ~~~Close~~~


Monti! is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
DDO account creation problem
can someone make me an ddo account?plzz.I need to play this game. I tried to make an account but it does an error like #Ftx....... Contact me at...
1 Replies - General Gaming Discussion
Account Page, Problem
Hallo, Ich habe eine Account Page erstellt, funktioniert auch soweit .. aber! Wenn ich auf die seite gehe und mir einen account erstellen will gibt...
14 Replies - WoW Private Server
[RELEASE] CoEmu v2 Character Creation Page
Since the only one I saw was only a copy that created a username, I made one that does a tad more. Source code: EDIT: People can't use pastebin...
23 Replies - CO2 PServer Guides & Releases
Setting up an account creation page for your WoW server
Ok then first of all you will want to download Wamp here : Download WampServer 2 - Download PHP, apache, MySQL just download it then install. It...
1 Replies - WoW PServer Hosting
Setting up an account creation page for your WoW server
Ok then first of all you will want to download Wamp here : Download WampServer 2 - Download PHP, apache, MySQL just download it then install. It...
0 Replies - WoW PServer Hosting



All times are GMT +1. The time now is 23:26.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.