Jump to content

Recommended Posts

Hey,

 

I'm trying to develop an website with web announcements and i'm stuck in something apparently easy but i don't know java at all... It's a php based website.

Example of what i want to do:

Visitor go to website, search for an announcement, finds it, then see all the details in the announcement_details_page, on this page is a link "save this announcement" which stores the announcement to that computer if it's clicked. Assuming the visitor save a few announcements. Then, other day he returns to the website, goes to "My saved announcements" page, and there finds the list with of the saved announcements, he may want to visit again or just simply delete one, two or all of them . Also if one announcement is no longer available the link for that particular announcement is no longer active and it displays something like (announcement expired)

 

If the visitor clear his web browser data (history, cookies, other stuff), the "My saved announcements" page will be empty. As far as i can see this is based on a cookie session.

All websites which use this technique have java-script for "save this announcement" link and "My saved announcements" page.

 

Can anyone help me with this? Any already made scripts over the internet, just ready for use? any idea, anyone did this before? please help! It's one of the last things i have to make to the website so i can just put it online.

 

Thanks in advance!!!

cookies would probably work; except for the whole deactivating dead links idea. you would probably need server side language & database interaction for that. most website don't go to that extreme. most just let the server side language & the database interaction; display a page that says something like "Page Not Found" or "Page Is No Longer Available". they usually don't try to disable each user's saved links; that would could be a lot of work, but I guess it could be done.

Hey, i don't know java at all...

It doesn't look like you know javascript either......

First do me a favor and read this: http://www.dannyg.com/ref/javavsjavascript.html

 

Now that you have done that, we can begin:

 

If I where you, I would just use php....

You can use php to set the cookies: http://us3.php.net/setcookie

 

Then everything else should be a cakewalk...

 

When a visitor arrives, check to see if they have your cookie(s)

If they do, check that the stored links are valid

If they are valid, display them

If not valid, delete them

 

There you have it, a step by step php guide to a cookie website. :)

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.