• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

How can I put an online phone book accessible only to registered users of my website.

I have a Small Business Network association (non-Profit I developed as a charity as a way to help people in my community network consisiting of about 200 people. I wanted to be able to put out all their information in an updatable database that I can continually add to either via a web interface or form that I or a registered user can access and in doing so once that user is registered that data information IE phone, email address etc is made available to anyone in the club. Maybe even make it searchable within the website to registered users so if they know the name they can find it or simply pull the whole list. I have a simple website made with dream weaver. Am I dreaming or is this a monumental feat to accomplish? Please advise.
Fletcher Burdine
Fletcher Burdine
3 Solutions
Richard DavisSenior Web DeveloperCommented:
Actually, what you are wishing to accomplish is a rather common task. Many websites use access control methods to only allow registered members to obtain the ability to view information.

If you're new to PHP & MySQL, I would recommend that you become familiarized with both by doing google searches for PHP tutorials as well as MySQL tutorials. On the other hand, if you have some basic skills with them, then it's just a matter of creating a users or members table in your database that will store usernames, encrypted (preferrably MD5) passwords and basic member account information.

Present them with a login form and if their login id and password matches, then set a session variable that can be used to allow only that signed in member the ability to see other pages that would otherwise be restricted from viewing.

Each page that you wish to embed behind an authentication system would just use a simple if($_SESSION['logged_in']) to check if a member is logged in and if not, then they would be redirected back to the login page and thus denied access to the member's only content. :)

Hope this was a base for you to model you site from.

Ray PaseurCommented:
What you want to do (and much more) is thoroughly described in this excellent book from SitePoint.


If you are interested in rapid prototyping, you might want to check out Ruby on Rails, where all of this client registration and login stuff is already built into the machine.  Or use one of the popular PHP systems like Joomla and Drupal.

Although you CAN do it, I would not recommend starting up a project by writing a registration and login system.  There is so much already written about that, and so many ways to do it wrong, that your value-added portion is almost certain to come from somewhere else in the application design.

best regards, ~Ray
Jason C. LevineNo oneCommented:
And since you mention Dreamweaver:

DW has a built-in server behavior that can automate the login process and protect selected pages.  All you need to do is configure the database and populate it.  The caveat is the that the DW behavior can be a little tricky to apply correctly the first time.  

If you don't want to learn PHP and you find the DW built-in behavior hard to work with and you are not adverse to spending a little money, there is an excellent extension from WebAssist called SecurityAssist that really makes password protection easy for the novice programmer.

Fletcher BurdineTableau Trainer & Consultant Sales Exec.Author Commented:
Great stuff gentlemen
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now