Location: PHPKode > projects > PHP Simple FAQ > phpsimplefaq1.1beta/phpsimplefaq/includes/admin_user.inc.php
<? // PHP Simple FAQ user page v1.0

if ($create == "yes") 

	{	
		if (($new_user_password != $new_user_password_check) || (!$new_user_name) || (!$new_user_email))
				
				{ 
					$error = "$user_error1_lang<br>";
					$create = "";
				} else {
					$new_user_md5 = md5($new_user_password);
					$sql_admin = "INSERT INTO $database_name.$user_table
								  (user_name, user_email, user_admin, user_password)
								  VALUES
								  ('$new_user_name','$new_user_email','$new_user_admin','$new_user_md5')";
					mysql_query($sql_admin, $connection);
					$sucess = "$sucess_lang";
				}
	}	


			echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">";
	?>		
			<center>
			<br>
			<? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\"><b>$add_new_user_lang</b></font>"; ?>
			<br>
			<? if ($error) echo "<font color=\"red\">$error</font>\n"; ?>
			<? if ($sucess) echo "<font color=\"red\">$sucess</font>\n"; ?>
			<br>
			<form action="manage_faq.php?action=users" method="post">
			<table border="0" width="450" cellspacing="2" cellpadding="2">
				<tr>
					<td width=150><? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">$user_name_lang:</font></td>"; ?>
					<td width=300><input type="text" name="new_user_name" size="30"></td>
				</tr>
				<tr>
					<td><? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">$user_password_lang:</font></td>"; ?>
					<td><input type="password" name="new_user_password" size="30"></td>
				</tr>
				<tr>
					<td><? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">$confirm_user_lang:</font></td>"; ?>
					<td><input type="password" name="new_user_password_check" size="30"></td>
				</tr>
				<tr>
					<td><? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">$user_email_lang:</font></td>"; ?>
					<td><input type="text" name="new_user_email" size="30"></td>
				</tr>
				<tr>
					<td><? echo "<font face=\"$font_face\" size=\"$font_size\" class=\"$font_class\">$is_admin_lang:</font></td>"; ?>
					<td><input type="checkbox" name="new_user_admin" value="Yes" checked></td>
				</tr>
				<tr>
					<td>&nbsp;<input type="hidden" name="create" value="yes">
					<? 		echo "<INPUT TYPE=\"hidden\" NAME=\"email\" VALUE=\"$email\">";
							echo "<input type=\"hidden\" name=\"password\" value=\"$password\">"; ?>
					</td>
					<td><input type="submit" name="Submit" value="<? echo "$add_user_button_lang"; ?>"></td>
				</tr>
			</table><br>
			</form>
Return current item: PHP Simple FAQ