PHP
  Home arrow PHP arrow Filters and Login Systems for Web Appl...
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Filters and Login Systems for Web Application Security
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2008-10-06

    Table of Contents:
  • Filters and Login Systems for Web Application Security
  • Definition and Storage File
  • The Login page
  • The code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Filters and Login Systems for Web Application Security


    (Page 1 of 4 )

    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.

    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


     

       

    PHP ARTICLES

    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...
    - Working with the Email Class in Code Igniter





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT