close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login / Session Problems

Thread began 4/03/2014 5:15 am by Paolo R | Last modified 4/03/2014 3:25 pm by Jason Byrnes | 262 views | 5 replies |

Paolo R

Allow Access if ID is same as session ID value

Hi Guys,

I'm just creating an edit profile page.
Basically it's working great when I get there by the URL parameter ID is = session value.

However, I want to limit the access so that only that person can change their profile.

E.G

editprofile.php?ID=6 = Mr Bloogs
editprofile.php?ID=5 = Mr Smith

I am logged in as Mr bloogs, if I change the ID i can change a different profile.
I've set up a rule for show region if ID = Session value but it's not working.

Can you help?
Attached is the page grab.

Thanks,
Paolo

Sign in to reply to this post

Jason ByrnesWebAssist

you would not use an access rule for this.

you would filter the recordset on the page to filter the ID column by the ID session variable instead of using the ID URL variable.

Sign in to reply to this post

Paolo R

Hi Jason,

I've done as you have suggest and I can see that the correct ID is going in the URL parameter but it's not displaying anything.

Sign in to reply to this post

Jason ByrnesWebAssist

are you sure you have the right session name?

add the following code to the page to write the session information:

<?php var_dump($_SESISON); ?>

it will include the session names and values, make sure you are using the right session name.

Sign in to reply to this post

Paolo R

Interesting... It's showing as Null... Evening on the page where It says "Welcome Paolo" - Which is a session variable in the record set!

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1:

<?php @session_start(); ?>

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...