Home arrow PHP arrow User Authentication for a Project Management Application

User Authentication for a Project Management Application

In the last article, we discussed in detail the user creation script. We looked at what information the script gets from the form and how it "cleans" and verifies form values, and then looked at how the user is informed about his or her log-in credentials. In this article, the conclusion to our four-part series, we'll finish the discussion.

TABLE OF CONTENTS:
  1. User Authentication for a Project Management Application
  2. User Information
  3. The Script
  4. Checking the User and Email
By: David Web
Rating: starstarstarstarstar / 1
August 18, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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%">&nbsp;</td>

<td width="22%">&nbsp;</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">&nbsp;</td>

</tr>

<?php if(isset($errmsg)){?>

<tr>

<td colspan="2" class="errmsg "><?php echo $errmsg; ?></ td>

</tr>

<tr>

<td colspan="2">&nbsp;</td>

</tr>

<tr>

<?php

}

?>



 
 
>>> More PHP Articles          >>> More By David Web
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap

Dev Shed Tutorial Topics: