Location: PHPKode > projects > The DVD Database Project > new_user.php
<?PHP 
require("common.php");
include("function.php");
session_start();
$string = ("SELECT * FROM user WHERE name='".$name."'");
$result = runquery($string);
$found = mysql_fetch_row($result);

if ((validsession($time)) && ($found[2]=="A")){
?>
	<HTML>
	<HEAD>
	<TITLE>DVD</TITLE>
	<link rel=stylesheet type="text/css" href="style.css">
	</HEAD>
	<BODY>

	<DIV ALIGN="right">
 	<H1><?PHP echo $adjective_of_your_choice; ?> DvD</H1>	
	</DIV> 
	
	<br>
	<H2>User Administration</H2>
<?PHP
$string = "SELECT * FROM user WHERE name='".$id."'";
$result = runquery($string);
$found = mysql_fetch_row($result);
?>
<TABLE>
<FORM action="input_user.php" method="post">
<TR>
<TD CLASS="top"><DIV CLASS="head">Name</DIV></TD>
<TD><input type="text" CLASS="top2" value="" name="nname"</TD>
</TR>
<TR>
<TD CLASS="top"><DIV CLASS="head">Password</DIV></TD>
<TD><input type="text" CLASS="top2" value="" name="npwd"</TD>
</TR>
<TR>
<TD CLASS="top"><DIV CLASS="head">Location</DIV></TD>
<TD><input type="text" CLASS="top2" value="<?PHP echo $found[3] ?>" name="nlocation"</TD>
</TR>
<TR>
<TD CLASS="top"><DIV CLASS="head">Email</DIV></TD>
<TD><input type="text" CLASS="top2" value="<?PHP echo $found[4] ?>" name="nemail"</TD>
</TR>
<TR>

<TD CLASS="top"><DIV CLASS="head">Check for Admin status  &nbsp;&nbsp;</DIV></TD>
<TD CLASS="top2"><input type="checkbox" name="nadmin" ></TD>
</TR>
<TR>
<TD><input type="submit" name="new_entry" value="Save New User"></TD>
</TR>

</FORM>
</TABLE>



<?PHP
}else{
$head = sprintf("Location: %s/invalidsession.html", $path);
header($head);
}
?>
Return current item: The DVD Database Project