Location: PHPKode > projects > PHP SQL tools > prfile/adduser.php
<?
if ((!$user_name) || (!$password)) {
	header ("Location: add_user.html");
	exit;
}
include("identify.php");
load_all("adduser",10,1);
//include("levelten.inc");

$table_name = "users";

$sql = "
	INSERT INTO $table_name
	(id, real_name, user_name, password, level, email, website, misc)
	VALUES
	(\"\", \"$real_name\", \"$user_name\", password(\"$password\"), \"$level\", \"$email\", \"$website\", \"$misc\") 
";

$result = @mysql_query($sql, $main_settings->connection) or die("Couldn't execute query.");

$sql = "
		SELECT *
		FROM $table_name
		WHERE user_name = \"$user_name\"
		ORDER BY id
	";

$result = @mysql_query($sql, $main_settings->connection) or die("Couldn't execute query.");

$id = $row['id'];
$user_name = $row['user_name'];
$real_name = $row['real_name'];
$password = $row['password'];
$level = $row['level'];
$email = $row['email'];
$website = $row['website'];
$misc = $row['misc'];

header ("Location: viewuser.php");
?>

Return current item: PHP SQL tools