The remaining part of the user creation script is the form in which the administrator inserts all the data about the user. The first block of HTML code displays the logged-in user name plus an option to log out, and also sets the page title. Both are marked in red below. <!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"><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Project Management</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <link href="../Templates/main.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="100%" border="0"> <tr> <td width="38%"> </td> <td width="22%"> </td> <td width="40%">Logged in:<!-- InstanceBeginEditable name="EditRegion4" --><? echo $_SESSION['name'];?> | <a href="../logout.php">Logout</a> <!-- InstanceEndEditable --></td> </tr> <tr> <td colspan="3" bgcolor="#6699CC"><span class="headertxt"> Project Management Software -Administration </span></td> </tr> <tr> <td colspan="3"><!-- InstanceBeginEditable name="EditRegion3" --> The next block creates and displays the form and crucially, sets the error message display area (again, both are highlighted in red for ease of identification). <form name="form1" action="add_user.php" method="post"> <table width="657" border="0" class="formborder"> <tr> <td colspan="2" class="loginheader">Create New User </td> </tr> <tr> <td colspan="2"> </td> </tr> <?php if(isset($errmsg)){?> <tr> <td colspan="2" class="errmsg "><?php echo $errmsg; ?></ td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <?php } ?>
blog comments powered by Disqus |
|
|
|
|
|
|
|