0

I managed to develop a PHP authentication/activation form which works fine for what I need, now what I'd like to do is adding an option to permit these members to become premium members by paying a fee so that they can fully access to the website contents (..i know it sounds like a "xxx" website... ;D).

Do you know any book or tutorials where I can find and learn a basic way on how to do it?

dgw
  • 13,418
  • 11
  • 56
  • 54
Gnu_nix
  • 25
  • 1
  • 6
  • This question is way too broad to answer. Where exactly are you having problems? Receiving payment? Restricting access? Login? Storing credentials? – JJJ Mar 29 '12 at 09:17
  • Hi there thank you for reply, I know it's a quite wide open question, mainly I'am wondering on how the payment company will interact with my website/DB after the payment in order to promore a user from , let's say, a guest profile to a premium one. – Gnu_nix Mar 29 '12 at 10:08

2 Answers2

1

What you're looking for is a role based access system.

You may have three types of users, e.g. guest, user and premium.

In your user object, you will have to record what role the user is, and then for any page, check which roles can access.

This is often implemented using an ACL, and the Zend Framework has a very good one. http://framework.zend.com/manual/en/zend.acl.html

Paul Bain
  • 4,364
  • 1
  • 16
  • 30
0

I will prefer to use zend_acl_module to solve your problem in perfect way. By this you can also handle future requirements. Refer to this link for further steps:

Practical Zend_ACL + Zend_Auth implementation and best practices

Community
  • 1
  • 1
Mohan Shanmugam
  • 644
  • 1
  • 6
  • 18