<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>