Dragon Raja Account creator (php)

Newbie Spellweaver
Joined
Nov 23, 2005
Messages
20
Reaction score
0
Hi, i finaly got my dragon raja server up and runing. (Works Perfectly allthough i had to change alot of things.)

if anyone has an php script for account creation. The please fell free to post one here. Im not really in the mood/got time to write one myself.

Also, if anyone has problems in Dragon Raja. Then just ask me, i know the basics by now.

regads.
 
Last edited:
I guess, it would have something to do with some form fields "input"

Like here:
<input type="submit" name="Submit3" value="Sign Up" class="select" onClick="return formCheckR(form44)">

Any ideas for a php script?
 
Oh well, didn't know that, sorry.

Well, if you haven't found it yet or haven't programmed it yourself, here's a simple script:

PHP:
<font face="Georgia">
<html>
<head>
	<title>Dragon Raja Registration</title>
</head>
<body>
<form action="" method="post">
<table border="0">
 <tr><td><b>Name:<td><input type="text" name="uname" id="uname" /></tr>
 <tr><td><b>Password:<td><input type="text" name="pwd" id="pwd" /></tr>
 <tr><td><b>Sex<td><select name="sex" id="sex"><option value="0">Male</option><option value="1" disabled="disabled">Female</option></select></tr>
 <tr><td><b>Delete pass:<td><input type="text" name="phint" id="phint" /></tr>
 <tr><td colspan=2><center><input type="submit" name="submit" value="Register" /></center>
</table>
</form>
</body>
</html>
<?
if(isset($_POST["submit"]))
{
echo "Submit has been input <b>(Step 1/5)</b><br>";
	if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["uname"]))
	{
echo "Name is conform to the required <b>(Step 2/5)</b><br>";
if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["pwd"])){
echo "Password is conform to the required <b>(Step 3/5)</b><br>";
if(preg_match("/([0-1]){1}/",$_POST["sex"])){
echo "Gender is conform to the required <b>(Step 4/5)</b><br>";
if(preg_match("/^([a-z0-9-]+){3,32}/i",$_POST["phint"])){
echo "Password hint is conform to the required. <b>(Step 5/5)</b><br>";
		$con = odbc_connect("TotalDB", "YOUR_WINDOWS_ACCOUNT_NAME", "WINDOWS_ACCOUNT_PASSWD");
		$result = odbc_exec($con, "SELECT MAX(id_index) AS 'maxid' FROM chr_log_info");
		$row = odbc_fetch_array($result);
		$maxid = $row["maxid"]+1;
		$result = odbc_exec($con, "INSERT INTO chr_log_info (id_index, login_id, passwd, passwd_hint, d_sex, d_jumin, d_kyulje)
									VALUES({$maxid}, '{$_POST['uname']}', '{$_POST['pwd']}', '{$_POST['phint']}', '{$_POST['sex']}', '111111-111111', 319)");
		odbc_close($con);
		print "Account created...";
	}}}}
} 
?>
<HTML><body>
<STYLE>
<!--
tr{font-family:Arial;font-size:12;text-decoration:none;}

a{text-decoration:none;color:#000040}
a:hover{color:#0000FF;}
-->
</STYLE></body></html>
</font>

I suck at html.
 
nice script bbblack, i am using it right now, and added some checking if account already exists, modified code snippet:

Code:
  $con = odbc_connect("TotalDB", "YOUR_WINDOWS_ACCOUNT_NAME", "WINDOWS_ACCOUNT_PASSWD");
  $user = $_POST["uname"];
  $result = odbc_exec($con, "SELECT COUNT(*) from chr_log_info where login_id = '".$user."'");
  $row = odbc_fetch_array($result);
  if($row[1] != 0){
     echo("Account already exists!"); 
     exit;
  }
 
Back