Request Register-Page Or account Creator

11/02/2008 10:31 µ~Xero~µ#1
Well i moved on ini´s but now i cant use my MySQL Register-Page Does someone know how to make one?
Would be awesome ^^

Regarts,

XNano
11/02/2008 14:54 tao4229#2
Learn PHP, or learn some socket shit in C# and make a basic .NET account creator.
11/02/2008 22:00 µ~Xero~µ#3
Ow.... i asked 4 a creator not how to make one :)
Im a bit busy thoose times with reallive shit so i just asked to get more time 4 more important stuff but ok ill search 4 tutorials n do it myselfe :):(:)
11/02/2008 22:18 !DeX!#4
get it
PHP Code:
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Web Account créator</title> 
</head> 

<body> 
<form id="form1" name="form1" method="post" action=""> 
  <label>Compte : 
  <input type="text" name="name" id="name" /> 
  </label> 
  <br /> 
  <label>Valider 
  <input type="submit" name="valid" id="valid" value="Valider" /> 
  </label> 
</form> 
<?php 
  
if (isset($_POST['valid'])) 
  { 
    if (
file_exists($name.".acc")) { 
      echo 
"Account already exist."
    } else { 
    
$fd fopen("E:/".$name.".acc""x+"); 
    
fwrite($fd,"[Account]\r\nAccName=$name\r\nPassword=\r\nLogonCount=0\r\nLogonType=2\r\nFlags=0\r\nCharacter="); 
    } 
  } 
  
?> 
</body> 
</html>
You can change where the .acc is created on line
PHP Code:
$fd fopen("E:/".$name.".acc""x+"); 
If u like it press Thanks That not mine :D- Spike -
11/02/2008 22:58 µ~Xero~µ#5
thank you soo much my friend ima try it now n post if it work
11/04/2008 00:07 İ Haydz#6
Quote:
Originally Posted by E*PvPers View Post
get it
PHP Code:
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Web Account créator</title> 
</head> 

<body> 
<form id="form1" name="form1" method="post" action=""> 
  <label>Compte : 
  <input type="text" name="name" id="name" /> 
  </label> 
  <br /> 
  <label>Valider 
  <input type="submit" name="valid" id="valid" value="Valider" /> 
  </label> 
</form> 
<?php 
$name 
$_POST['name'];
  if (isset(
$_POST['valid'])) 
  { 
    if (
file_exists($name.".acc")) { 
      echo 
"Account already exist."
    } else { 
    
$fd fopen("E:/".$name.".acc""x+"); 
    
fwrite($fd,"[Account]\r\nAccName=$name\r\nPassword=\r\nLogonCount=0\r\nLogonType=2\r\nFlags=0\r\nCharacter="); 
    } 
  } 
  
?> 
</body> 
</html>
You can change where the .acc is created on line
PHP Code:
$fd fopen("E:/".$name.".acc""x+"); 
If u like it press Thanks That not mine :D- Spike -
That won´t work because $name is not defined, Add $name = $_POST['name']; after <?php
11/04/2008 01:31 plasma-hand#7
heres a really simple on that works.It was made for the old samhaven source credits go to lolmaster

Quote:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web Account créator</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<label>ACCOUNT ID!
<input type="text" name="name" id="name" />
</label>
<br />
<label>SUBMIT!
<input type="submit" name="SUBMIT" id="valid" value="Register!" />
</label>
</form>
<?php
if (isset($_POST['valid']))
{
if (file_exists($name.".acc")) {
echo "Account already exist.";
} else {
$fd = fopen("C:/Source/bin/debug/Accounts/".$name.".acc", "x+");
fwrite($fd,"[Account]\r\nAccName=$name\r\nPassword=\r\nLogonCount=0\r\n LogonType=2\r\nFlags=8\r\nCharacter=");
}
}
?>
</body>
</html>
11/04/2008 01:48 plasma-hand#8
well heres the site i got it from [Only registered and activated users can see links. Click Here To Register...]
11/04/2008 15:05 demonscim#9
PHP Code:
<html>
<head>
<title>Register.</title>
</head>
<body>
<center>
<h1>Register to play. Password will be set on first login.</h1>
<form action="register.php?register=yes" method="post">
<b>Username:</b> <input type="text" name="user"><br>
<input type="submit" value="Register">
</form>
</center>
</body>
</html>


<?php
//connect to the database.

$dbhost 'localhost'//keep as localhost
$dbuser 'root'//keep as root
$dbpass ''//enter in your password for your database.
$dbname 'coproj'//probabally coproj

$conn mysql_connect($dbhost$dbuser$dbpass);
    

    
mysql_select_db($dbname);
    


$user $_POST['user'];

    
mysql_query("INSERT INTO accounts (AccountID, LogonType, LogonCount) VALUES ('$user','2','1')");
    
    if (
$_GET['register'] == "yes") {
        echo 
"Thank you for registering you may now play.";
    }
?>
Simple as it gets takes 5 minutes to learn in php.. :p..
11/04/2008 15:59 Kiyono#10
Quote:
Originally Posted by demonscim View Post
PHP Code:
<html>
<head>
<title>Register.</title>
</head>
<body>
<center>
<h1>Register to play. Password will be set on first login.</h1>
<form action="register.php?register=yes" method="post">
<b>Username:</b> <input type="text" name="user"><br>
<input type="submit" value="Register">
</form>
</center>
</body>
</html>


<?php
//connect to the database.

$dbhost 'localhost'//keep as localhost
$dbuser 'root'//keep as root
$dbpass ''//enter in your password for your database.
$dbname 'coproj'//probabally coproj

$conn mysql_connect($dbhost$dbuser$dbpass);
    

    
mysql_select_db($dbname);
    


$user $_POST['user'];

    
mysql_query("INSERT INTO accounts (AccountID, LogonType, LogonCount) VALUES ('$user','2','1')");
    
    if (
$_GET['register'] == "yes") {
        echo 
"Thank you for registering you may now play.";
    }
?>
Simple as it gets takes 5 minutes to learn in php.. :p..
well learn to read now lol he said INI not mysql lol
11/04/2008 19:19 justprownage#11
This one looks better xD.
Register.php
Code:
<?php
include("config.php");
?>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>


  
  <div id="right">
    <div class="post">
<?php
$my_connection = mysql_connect($db['info']['host'], $db['info']['user'], $db['info']['pass']);
$my_database = mysql_select_db($db['info']['name']);
?>
<form action="?op=register" method="post">
  <div align="center">
    <h2><span class="style1">Account creator<br>
      Registration Form</span>    <br />
    </h2>
  </div>
  <table width="338" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Re-type Password: </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="Register" />
  </p>
  <p align="center">&nbsp;  </p>
</form>
<div align="center">
<?php
	                                           mysql_select_db($my_database);
			$res = mysql_query("SELECT count(*) FROM accounts;");
			$val = mysql_fetch_array($res);
			echo "Total Accounts: ".$val[0]."<br />";
?>
<div align="center">
<?php
		                      mysql_select_db($my_database);
			$res2 = mysql_query("SELECT count(*) FROM characters;");
			$val2 = mysql_fetch_array($res2);
			echo "Total Characters: ".$val2[0]."<br />";
?>
<div align="center">
  <?php
if(isset($_POST['submit'])) {
if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die('You must fill in all of the fields!<BR>');
}
if(!get_magic_quotes_gpc()) {
$user = addslashes($_POST['user']);
$pass = md5($_POST['pass1']);
} else {
$user = $_POST['user'];
$pass = md5($_POST['pass1']);
}
$pass2 = md5($_POST['pass2']);
$check = mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
$check2 = mysql_num_rows($check);
if($check2 != '0') {
die("Username: '".$user."' is in use!");
}
if($pass != $pass2) {
die('Passwords do not match!');
}

$insert_member = mysql_query("INSERT INTO accounts (AccountID, LogonType) VALUES ('$user', '2')");
if($insert_member) {
echo("<p class='b01'>Registration Complete!  Click <a href=index.php>here</a> to go back to the Home page.");
} else {
echo("<p class='b01'>Registration Failed!</p>");
}}
?>	
</div>
	</div>
		<div class="post">
		  <ul>
		  </ul>
		</div>		
  </div>
Config.php
Code:
<?php
$db['info']['user'] = "root"; //Your Username for MySQL
$db['info']['pass'] = "root"; //Your Password for MySQL
$db['info']['host'] = "localhost"; //Your host
$db['info']['name'] = "coproj"; //Your database name
11/04/2008 21:30 plasma-hand#12
as he stated NO MYSQL
11/04/2008 21:48 Kiyono#13
Quote:
Originally Posted by justprownage View Post
This one looks better xD.
Register.php
Code:
<?php
include("config.php");
?>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>


  
  <div id="right">
    <div class="post">
<?php
$my_connection = mysql_connect($db['info']['host'], $db['info']['user'], $db['info']['pass']);
$my_database = mysql_select_db($db['info']['name']);
?>
<form action="?op=register" method="post">
  <div align="center">
    <h2><span class="style1">Account creator<br>
      Registration Form</span>    <br />
    </h2>
  </div>
  <table width="338" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Re-type Password: </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="Register" />
  </p>
  <p align="center">&nbsp;  </p>
</form>
<div align="center">
<?php
	                                           mysql_select_db($my_database);
			$res = mysql_query("SELECT count(*) FROM accounts;");
			$val = mysql_fetch_array($res);
			echo "Total Accounts: ".$val[0]."<br />";
?>
<div align="center">
<?php
		                      mysql_select_db($my_database);
			$res2 = mysql_query("SELECT count(*) FROM characters;");
			$val2 = mysql_fetch_array($res2);
			echo "Total Characters: ".$val2[0]."<br />";
?>
<div align="center">
  <?php
if(isset($_POST['submit'])) {
if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die('You must fill in all of the fields!<BR>');
}
if(!get_magic_quotes_gpc()) {
$user = addslashes($_POST['user']);
$pass = md5($_POST['pass1']);
} else {
$user = $_POST['user'];
$pass = md5($_POST['pass1']);
}
$pass2 = md5($_POST['pass2']);
$check = mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
$check2 = mysql_num_rows($check);
if($check2 != '0') {
die("Username: '".$user."' is in use!");
}
if($pass != $pass2) {
die('Passwords do not match!');
}

$insert_member = mysql_query("INSERT INTO accounts (AccountID, LogonType) VALUES ('$user', '2')");
if($insert_member) {
echo("<p class='b01'>Registration Complete!  Click <a href=index.php>here</a> to go back to the Home page.");
} else {
echo("<p class='b01'>Registration Failed!</p>");
}}
?>	
</div>
	</div>
		<div class="post">
		  <ul>
		  </ul>
		</div>		
  </div>
Config.php
Code:
<?php
$db['info']['user'] = "root"; //Your Username for MySQL
$db['info']['pass'] = "root"; //Your Password for MySQL
$db['info']['host'] = "localhost"; //Your host
$db['info']['name'] = "coproj"; //Your database name
INI not MySQL and CO Passwords do not use md5...