\n"; if (!$_POST["accpass1"]) $err .= "Enter an Password
\n"; if (!$_POST["accpass2"]) $err .= "Repeat Password
\n"; if ($err == "") { if ($_POST["accpass1"] != $_POST["accpass2"]) $err .= "Passwords does not match!
\n"; } if ($err == "") { // using standard windows authentication, whwn you use a password, use this line // $msconnect = mssql_connect("localhost", "sa", "pass"); $msconnect = mssql_connect("localhost"); $msdb = mssql_select_db("kal_auth", $msconnect); $cpass = passConvert($_POST["accpass1"]); $query = "INSERT INTO Login ([ID], [PWD], [Birth], [Type], [ExpTime]) VALUES('".$_POST["accname"]."', $cpass , '19190101', '0', '4000')"; //echo $query; $acccreate = mssql_query($query); if ($acccreate) { $uid = mssql_result(mssql_query("SELECT [UID] from Login WHERE [ID]='".$_POST["accname"]."'"),0,0); mssql_close() or die('failed closing mssql'); //echo $query; $_POST["accname"] = ""; $_POST["str"] = ""; $_POST["hlt"] = ""; $_POST["int"] = ""; $_POST["wis"] = ""; $_POST["agi"] = ""; $err = "Acc created ! =) you can now log in!"; } else echo "Somethings Wrong!! :P"; mssql_close() or die('failed closing mssql'); } } ?>