Web Design Forum: Secure pages - per user - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Secure pages - per user Rate Topic: -----

#1 User is offline   mrsminkie 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 588
  • Joined: 23-December 09
  • Reputation: 21
  • Gender:Female
  • Location:South Yorkshire
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 17 March 2010 - 07:35 PM

Hi,

I've been tinkering about with some coding to password protect pages. However, I'm after something different - I want to be able to give each user their own specific area/page on the site - read only - so that updates for their eyes only can be viewed by them.

I can't seem to find anything on the web for this - all tutorials seem to be for log ins to enable the person to view a page or not. I would like a user to log in and see a page of data.

So for example, if Mr Bloggs from A Company gets a login, they will be directed to www.adomain/acompany.html; and someone from another company, say A Firm would get www.domain/afirm.html.

I hope that makes sense. What should I be looking for? Sometimes it's my lack of correct terminology which hinders my finding things on the web.

Cheers

Lorraine
0

#2 User is online   notbanksy 

  • Refreshingly Belligerent Marxist
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,937
  • Joined: 14-February 08
  • Reputation: 183
  • Gender:Male
  • Location:Darkest rural Somersetshire
  • Experience:Advanced
  • Area of Expertise:Copywriter

Posted 17 March 2010 - 07:58 PM

Modx will do this with ease. http://modxcms.com/
1

#3 User is offline   mrsminkie 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 588
  • Joined: 23-December 09
  • Reputation: 21
  • Gender:Female
  • Location:South Yorkshire
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 17 March 2010 - 09:00 PM

View Postnotbanksy, on 17 March 2010 - 07:58 PM, said:

Modx will do this with ease. http://modxcms.com/


Thank you. At first glance, I'm not sure where to start. Any pointers?
0

#4 User is offline   TopShopper 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 878
  • Joined: 21-July 09
  • Reputation: 14
  • Gender:Male
  • Location:Cardiff, UK
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 18 March 2010 - 07:26 AM

Modx seems a bit heavy handed for this. I presume you are using a database to hold your usernames and passwords. Just put in the users 'home page' as well then redirect them to it using :
header("Location: $homepage");
where $homepage contains the appropriate url.
Remember, the header must be sent before any other output (even spaces) to the browser.
0

#5 User is online   rallport 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 3,814
  • Joined: 03-January 10
  • Reputation: 266
  • Gender:Male
  • Location:England, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 18 March 2010 - 09:25 AM

MODx is simply overkill for this. :rolleyes:

For users you'd usually have a kind of controller page (E.g. user.php) that would load the current users details.

However, for your problem I'd the following:

  • Create a table with the following columns: userID, Name, PageURL
  • When checking if a user is logged in fecth the PageURL from the DB too
  • If the user name and password is valid, redirect them to their PageURL
  • On the page URL you'd need a little more checking too. E.g. to ensure the current user matches the allowed user (or users) to whom the page belongs. If you wanted to allowed multiple people access to a page you'd need a couple of moire tables.

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users