Members login to unique members page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kitegirl
Forum Newbie
Posts: 9
Joined: Tue Dec 02, 2008 6:07 pm

Members login to unique members page

Post by kitegirl »

Hi there - I would very much appreciate pointers in the right direction here please and I understand if I am asking too much!.....- I build fairly basic websites for clients and dabble with PHP for email forms etc. however a client of mine has a business that has several members and they want to provide a service (webpage) where their members can 'login' and a page is then shown them specific to that member (with unique photos, text, forms etc). It's a property cleaning business for what it's worth.

I am guessing it could be built with a simple PHP login script - which also calls a unique ID? - that ID would be a unique page. However on that unique page I would also have global information across them all. (again - I am so new to php - that I am also assuming that this kind of global info should be pretty easy>??)

so questions:
1) Can you have a single "dynamic page" that pulls in images or text or forms depending on which ID has logged in? But also has static content and global content that would be the same across all. Can it be done in PHP?

(that Rather than build say 40 static pages for 40 members) - I am assuming yes - as i guess that's what every community based site is like?!

2) How then does the "copy" or "images" etc get updated for each unique ID. Could this be set up in turn by a dynamic CMS - Where I type in copy in say a html based CMS and pick the ID from the drop down that I want to be updated?

3) Finally - if "copy" IS modified for the unique ID - (by me the developer) can a email be sent to the member automatically informing them there member page has been updated?

That's it. So in a nutshell - the website owner can update those unique member pages via a CMS (update to unique member only or global) and in turn The member should log in and see updates to their unique page.

Thankyou thankyou - for your help in advance.

Katie
mattpointblank
Forum Contributor
Posts: 304
Joined: Tue Dec 23, 2008 6:29 am

Re: Members login to unique members page

Post by mattpointblank »

Okay, your requirements aren't too tough - you're right about needing a unique member ID, then you can relate everything in your database to them. Say you have three users, Bob, Dave and Mike. Their IDs are 1, 2 and 3 respectively. You can store their info (username, password, etc) in a 'users' table. You could then have a table 'user_photos', with fields like photoID, userID, photoName, photoURL etc. When the user logs in, you just display all of the photos that have a userID equal to the logged in user's ID. Simple!

As for the login itself, a nice starting point might be a simple little script right here: http://phpuserclass.com - read the documentation, but it basically sets itself up. Once you've configured it, you just need to add some code to check the user's access level (eg, if they have permission to view the special pages), and then you can access their ID and query your database accordingly.

Make sense?!
kitegirl
Forum Newbie
Posts: 9
Joined: Tue Dec 02, 2008 6:07 pm

Re: Members login to unique members page

Post by kitegirl »

Thanks Matt, It does make complete sense in theory. In practice however I will be struggling. - I've never even created a database before !
So I believe I may just start back a bit and learn about databases. Thanks for your help.

Cheers
Katie
Brad7928
Forum Commoner
Posts: 39
Joined: Thu Jan 29, 2009 4:54 pm

Re: Members login to unique members page

Post by Brad7928 »

Hi Katie,

I would be very interested in creating a (test) site such as this, although i am not that good with PHP i can research lol. Two head's are better than one! Email me at Brad7928(at)live.com. au
kitegirl
Forum Newbie
Posts: 9
Joined: Tue Dec 02, 2008 6:07 pm

Re: Members login to unique members page

Post by kitegirl »

Thanks Brad - but I think I will leave it. I am thinking of just recommending them setting up blogs for their clients... which may be easier (and more cost effective for them). Thanks for the offer though and good luck.
K
User avatar
Skoalbasher
Forum Contributor
Posts: 147
Joined: Thu Feb 07, 2008 8:09 pm

Re: Members login to unique members page

Post by Skoalbasher »

This has database written all over it. You should read up on MySQL. It's a lot easier than most think. If you can do PHP you can learn MySQL.
Post Reply