Home arrow ASP arrow Page 5 - Creating a members area with ASP
ASP

Creating a members area with ASP


A frequent task for ASP developers is to create a members area style section of a website. This would normally involve registration, a login page, and then access to a section of the site that is only available to registered users. In this article James shows us how to do exactly that by using ASP and SQL Server. By the end of this article you'll have a fairly good idea of how you can implement your own members area on your site.

Author Info:
By: James Crowley
Rating: 5 stars5 stars5 stars5 stars5 stars / 50
April 25, 2002
TABLE OF CONTENTS:
  1. · Creating a members area with ASP
  2. · Creating the database
  3. · The register.asp code
  4. · The login.asp code
  5. · The members area
  6. · Conclusion

print this article
SEARCH DEVARTICLES

Creating a members area with ASP - The members area
(Page 5 of 6 )

We aren't going to waste any time giving you ideas on what you can put in your members area; that's up to you. The only bit of code you need to include in all your members pages is a section to check if the user is logged in or not. If they aren't, then they are automatically redirect to the login page:
<% If Session("loggedin") <> True
Then Response.Redirect "login.asp" %>
<html>
<head>
<title>Members Area</title>
</head>
<body>
<h1>Members Area</h1>
<p>Welcome to our members area!</p>
</body>
</html>

and that's it! A few things to note...

  1. If you try to access default.asp before you have logged in then you wonít be able to.
  2. Once you have logged in, if you visit login.asp again, you will automatically be logged out. So, if you want a 'Log Out' link in the memberís area, simply link to login.asp

And that's it! You now have your very own members area!


blog comments powered by Disqus
ASP ARTICLES

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

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-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials