Jump to content

php and javascript named anchors


jodunno

Recommended Posts

Dear members,

I have a self-inflicted problem but i do not know of a proper solution. My site is a subscription based members only website. Some pages are protected pages while others are low security accessible pages. This means that low-security pages only check the session for login. An example of low-security is a news article or press release. PHP on low-security pages just checks the session to see if the user is a logged in member. The low-security pages are accessed via standard hyperlinks with a constant address (e.g., place.ext/News).

Protected pages, on the other hand, are hidden behind a post form which utilizes prg to send the request to the index page (place.ext). The requests are analyzed for tokens, timestamps, referrer, ip address etc. the user is checked in the database and the session data is compared to verify user login status etc. Such a design prevents me from using anchor names to jump to specific places in the page (place.ext#jumplink).

I am trying to figure out a way to still use named anchors. I think that a session variable can be used to store the anchor name for jumping. Then i wonder if i could use javascript to actually make the jump? (document.location perhaps?)

is there someway to use php for this task besides a session variable? has anyone done this before? i cannot think of a simple solution.

Thabk you and Best Wishes.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.