Home arrow PHP arrow Filters and Login Systems for Web Application Security

Filters and Login Systems for Web Application Security

In this article we will be building our application, using the concepts discussed in the previous articles. Any web site that is selective in the kind of users that it wants to grant access to will need some method of filtering. This filtering is usually done through a login system. This (and more) is what we will be building. This article is the third part of an eight-part series.

TABLE OF CONTENTS:
  1. Filters and Login Systems for Web Application Security
  2. Definition and Storage File
  3. The Login page
  4. The code
By: David Web
Rating: starstarstarstarstar / 5
October 06, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The application

The application will consists of the following files:

  • login.php This script will be responsible for authenticating users.
  • logout.php - This script will log users out of the system.
  • passman.php This script will be responsible for managing passwords.
  • register.php This script will be responsible for registering new users.
  • fns.php This script contains all the functions that will be used by the site.
  • config.inc This script contains connection details.
  • was.css This script contains the styles for the site.
  • was.dwt.php This script is a template.

The template for the site is actually very simple. It has the following HTML:


<!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">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!-- TemplateBeginEditable name="doctitle" -->

<title>Untitled Document</title>

<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="head" -->

<!-- TemplateEndEditable -->

<link href="was.css" rel="stylesheet" type="text/css" />

</head>


<body>

<table width="99%" border="1">

<tr>

<td bgcolor="#333333" class="header">Web Secure</td>

</tr>

 

 

<tr>

<td><!-- TemplateBeginEditable name="main" -->main<!-- TemplateEndEditable --></td>

</tr>

<tr>

<td class="copy">&copy;2008</td>

</tr>

</table>

</body>

</html>


And the following look:



The Cascading Style Sheet is even simpler. It has the following code:


body,html {

font-family:Verdana, Arial, Helvetica, sans-serif;

font-size:12px;

}

.header{

text-align:center;

font-size:24px;

color:#FFFFFF;

font-weight:100;

}

.copy{

font-size:9px;

text-align:right;

}

.list{


font-size:11px;

}

.listtop{


border-bottom:1px;

border-bottom-color:#000000;

border-bottom-style:solid;

font-weight:bold;

background-color:#CCCCFF;}

.temptitle {

font-size: 24px; font-weight: normal; color: #ffffff;

background-color:#003366;

text-align:center;

 

}

#myimg{

margin-right:60px;

margin-left:600px;

}

 

#mytxt{

text-align:left;

position:absolute;

left: 237px;

top: 39px;

height: 27px;

font-size:24px;

color:#FFFFFF;

background-color:#003366;

 

 

}

The CSS simply defines a few styles that are used by the PHP scripts.



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: