Home arrow PHP arrow PHP for Beginners by a Beginner: Simple Login, Logout, and Session Handling
PHP

PHP for Beginners by a Beginner: Simple Login, Logout, and Session Handling


In this article, James presents a very simple way to add login/logout security in PHP using session handling.

Author Info:
By: James Ruttan
Rating: 4 stars4 stars4 stars4 stars4 stars / 468
February 09, 2003
TABLE OF CONTENTS:
  1. · PHP for Beginners by a Beginner: Simple Login, Logout, and Session Handling
  2. · Building It Up
  3. · Breaking It Down
  4. · Moving It Around
  5. · Conclusion

print this article
SEARCH DEVARTICLES

PHP for Beginners by a Beginner: Simple Login, Logout, and Session Handling
(Page 1 of 5 )

First off, let me say that, yes, I am still a beginner with PHP. Throughout the course of learning PHP though, whenever Iím stuck I like to go online to some of the chat rooms and ask for help.

I have found, though, that the reputation of Ďcomputer geeksí, as parodied on Saturday Night Live, is well deserved by a lot of people. Asking for help from them was like asking them to let you borrow that authentic Klingon uniform they have in the display case down there with them in their parentsí basement (can you feel the love?). While I did find some help (after a lot of persistence), one thing I noticed with myself and with other novices was that the help came in a form as if we were on their level of programming, or we were met with a mass of arrogance and condescension, so, myself, I would still have to spend a couple of hours finding tutorials and articles here at DevArticles.com. But, I still had to have some things explained to me, which was a whole new task in itself.

As Iíve grown a little more with my skills in PHP though, Iíve also begun offering help to other beginners with what knowledge I have and can share. One of the biggest problems I always get asked about is how to protect an area with a login and with sessions. I do not claim that this method is the strongest or the most secure, but that it is a simple solution to a beginnerís problem.

One of my own preferences as a beginner when writing code is to use an editor, and one that is able to check the syntax as I have written it and return any errors. My own personal preference is one I have found to be a very good and inexpensive one. Ankordís PHP Expert Editor , is, for me, a decent editor, and it only costs $35 to buy. You can also download a 30 day trial version from their site to try first. (No, Iím not affiliated with the company, I just like the product.) For it to check for syntax errors, you need to download and install the latest version of PHP.

This editor is just my own personal preference; you may have your own or prefer not to use one, and I make no claims regarding your own experience with this editor.

After trying a few different methods for simple form-based user authentication, I have found this method the least troublesome, especially when I wanted to add more to the authentication, such as simple access logging, but we will not be able to go into that here. This article does assume that you have some basic knowledge of PHP and HTML, but I hope that I have explained it in a way that any beginner can follow. I just wanted to share my knowledge of PHP that I have gained so far with other beginners, and would like to keep sharing it as I continue to progress.
blog comments powered by Disqus
PHP ARTICLES

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials