$MD5Code = "kikugalanet"; // Your Neuz MD5 Code
	 $dbAddr = ""; // Your MSSQL Host IP
	 $dbName = "ACCOUNTS_DBF"; // Your Account Database
	 $dbUser = "root"; // Your Database user
	 $dbPass = ""; // Your Database User password
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<title>AminusFlyff :: Register Page</title>
		function cleanFormData($data) {
			$data = @strtolower($data);
			$data = @trim($data);
			$data = @htmlentities($data);
			$data = @strip_tags($data);
			return $data;
		if(isset($_POST['regacc'])) {
			// Form Data
			$usrLogin = cleanFormData($_POST['user']); // Username
			$usrPassNoMD5 = cleanFormData($_POST['pass']); // Password non-encrypted
			if($usrLogin = "" || empty($usrLogin) || $usrPassNoMD5 = "" || empty($usrPassNoMD5)) {
				echo "You left blank fields!";
			$dbLink = @mssql_connect($dbAddr, $dbUser, $dbPass);
			if(!$dbLink) {
				echo "Failed on processing your register form.<br />Reason: Cannot connect to SQL Server<br />Try to refresh the page or try again later.<br />We 

apologize for any inconvenience.";
			@mssql_select_db($dbName, $dbLink);
			$checkUsrQ = @mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account='".$usrLogin."'");
			$checkUsr = @mssql_num_rows($checkUsrQ);
			if($checkUsr > 0) {
				echo "This username is already been used by another player.";
			} else {
				$usrPass = md5($MD5Code . $usrPassNoMD5);
				$storedProc = @mssql_init("createaccount", $dbLink);
				$usrAccParameter = @mssql_bind($storedProc, '@account', $usrLogin, SQLVARCHAR, false, false, 15);
				$usrPwdParameter = @mssql_bind($storedProc, '@password', $usrPass, SQLVARCHAR, false, false, 32);
				$addNewUsr = @mssql_execute($storedProc);
 				if(!$addNewUsr) {
					echo "Failed on processing your register form.<br />Try to refresh the page or try again later.<br />We apologize for any 

				} else {
					echo "Your account has been created sucessfully!<br />Your login: <b>".$usrLogin."</b> - Your Pass: ****<br />Enjoy playing on our 

	[U][B]<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">[/B][/U]
		Username: <input type="text" name="user" size="15" maxlenght="15" /><br />
		Password: <input type="password" name="pass" size="15" /><br />
		Name: <input type
		<input type="submit" name="regacc" />

does the underlined code right? Coz' im getting a white screen output when i press submit query button im using the xampp server

just keep the action of the form blank, remove that $_SERVER

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.