PHP
  Home arrow PHP arrow Page 3 - A Login System for a PHP Email Applica...
Dev Shed Forums 
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

A Login System for a PHP Email Application
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 19
    2006-11-01

    Table of Contents:
  • A Login System for a PHP Email Application
  • The code: form verification
  • The code: logging out and registration
  • The code: form handling and user profile

  • 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


    A Login System for a PHP Email Application - The code: logging out and registration


    (Page 3 of 4 )

    Logout page. This page basically logs you out of the system and destroys any sessions that were created when you logged in. The application then returns the user to the login page.

    Logout.php

    <?
    ob_start();
    session_start();
    session_unset();
    session_destroy();
    header("location:login.php");
    ?>

    register.php. This code registers a new user. The fields provided in the form match those declared in the users table. See the previous article.

    form

    <table width="100%" border="0" cellspacing="7">
      <tr bgcolor="#FFFFFF">
        <td valign="top">&nbsp;<img src="images/registration.png"
    width="661" height="130" /></td>
      </tr>
      <tr>
        <td width="89%" valign="top" colspan="2"><form
    action="register.php" method="post" >
                  <table width="100%" border="0" cellspacing="1"
    class="block">
            <tr class="table">
              <td colspan="2">&nbsp;</td>
              </tr>
            <tr>
              <td colspan="2">*<strong>ALL</strong> fields are
    required. </td>
            </tr>
            <tr>
              <td colspan="2">&nbsp;</td>
            </tr>
            <tr class="td">
              <td colspan="2"><strong>User Info: </strong></td>
            </tr>
            <tr>
              <? if($err){?>
                            <td width="87%" valign="bottom"
    colspan="2"><? 
                            echo "The following errors where
    detected:<br>";
                            echo "<font color = "#ff000
    ">$errmsg</font><br>"; ?>  </td>
          <? }?>
                     </tr>
            <tr>
              <td width="29%">Login name </td>
              <td width="71%"><input name="uname" type="text"
    id="uname" size="60" /></td>
            </tr>
            <tr>
              <td>Login Password </td>
              <td><input name="upass" type="text" id="upass"
    size="60" /></td>
            </tr>
                            <tr>
              <td>Email Address </td>
              <td><input name="email" type="text" id="email"
    size="60" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr class="td">
              <td colspan="2"><strong>Logon Info: </strong></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>RemoteUsername </td>
              <td><input name="remuser" type="text" id="remuser"
    size="60" /></td>
            </tr>
            <tr>
              <td>Remote Password </td>
              <td><input name="rempass" type="text" id="rempass"
    size="60" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr class="td">
              <td colspan="2"><strong>Server Info: </strong> </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Incoming Mail Server: </td>
              <td><input name="pop3" type="text" id="pop3"
    size="60" /></td>
            </tr>
            <tr>
              <td>Outgoing Mail Server: </td>
              <td><input name="smtp" type="text" id="smtp"
    size="60" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><input type="submit" name="submit" value="Register
    me now!" /></td>
            </tr>
          </table>
                  </form>    </td>
      </tr>
      <tr>
        <td colspan="2"><div align="center">Copyright 2005 </div></td>
      </tr>
    </table>

    More PHP Articles
    More By Leidago


       · Hope this article on Emailling with PHP/MYSQL will be useful to someone.
     

       

    PHP ARTICLES

    - Using Aliases and the Autoload Function with...
    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - 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
    - Sub Classing Exceptions in PHP 5
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




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