You are here: Re: [PHP] strange sessions « PHP « IT news, forums, messages
Re: [PHP] strange sessions

Posted by Tim Burgan on 09/26/34 11:05

Hello,


Here's a link to a website demonstrating my problems:
<http://www.timburgan.com/problems/>
You can download the code from the site or here:
<http://www.timburgan.com/problems/files/site.zip>

I'm experiencing some weird issues with sessions, and because I'm quite
new to PHP and sessions.. I'm a bit lost. My use of headers also seems
to be playing up.

I'd really appreciate it if someone has time to assist me, look at my
code, and solve some of my problems that are described below.

On my website, there are 3 types of users:

1. Students
2. Staff
3. Admin

There are many students, and students are able to login and edit their
own page, but they have no rights to edit other student pages, staff
pages, or any other pages.

There are many staff members, and staff are able to login and edit their
own page, but they also have no rights to edit other student pages or
staff pages. BUT THEY ARE ALLOWED TO EDIT ANY OTHER PAGES.

The admin is also staff member, but they are given admin status and
therefore able to edit anything - including any students, staff, or content.

When someone logs-in successfully, they are taken to the editing page.
If the editing page is then closed and the user tries to navigate the
site as any normal "non-logged-in user" would (by clicking the
navigation links), the address bar in the browser changes, but the
content stays the same and doesn't change.

Also, when someone logs-in successfully, they are taken to the editing
page. If the editing page is then closed they are returned to the
original page they were trying to edit. If the user then clicks [edit
this page] again, it says they do not have permission to edit this
page.. even though they do!

By the way- to login, staff are Joe (username & password are both: joe)
and Simon (username & password are both: simon). Students are Tim
(username & password both: tim), and Grace (username & password both:
grace).


Thank you very much for your time and assistance.

I cannot thank you enough.

Tim Burgan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация