work_it_work Posted January 18, 2009 Share Posted January 18, 2009 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!!! Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/ Share on other sites More sharing options...
webster08 Posted January 20, 2009 Share Posted January 20, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-740935 Share on other sites More sharing options...
work_it_work Posted January 21, 2009 Author Share Posted January 21, 2009 thanks webster08 for the reply please look at this web: salzburgauto24.at they use this technique and it's based on cookies. if the announcement is no longer available, the link is removed... Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-742255 Share on other sites More sharing options...
work_it_work Posted January 26, 2009 Author Share Posted January 26, 2009 no one knows? Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-746482 Share on other sites More sharing options...
bobleny Posted January 26, 2009 Share Posted January 26, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-746615 Share on other sites More sharing options...
work_it_work Posted January 26, 2009 Author Share Posted January 26, 2009 thanks bobleny. i tought it will be easier to use javascript... i'll give it a try with php Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-746761 Share on other sites More sharing options...
work_it_work Posted January 26, 2009 Author Share Posted January 26, 2009 solved with php, topic will be marked as solved Quote Link to comment https://forums.phpfreaks.com/topic/141320-solved-need-urgent-help-with-javascript-link-parking/#findComment-747018 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.