View Full Version : Add-Favorites script
09-10-2006, 06:35 PM
hello there, I have been searching for an asp 'save favourites' script. I wish to use it for a property website where users can save/view/delete their favourite properties, say from a listing.
I'm not entirely sure but I believe that since I do not require a log-in area, this can only be done with cookies. Im using MS Access also.
Can somebody please help me with a basic programme flow of how the script might work, a script found online, or developed already that can be modified (I will include full acknowledgements)
Many thanks for any help in advance.
09-12-2006, 03:44 PM
POINT 1. Login needed: it would be prudent to aske them for their name and email to save property listings for furthe review. This would also allow you to access this information from a sales point of view.
POINT 2. Cookies would only work on the computer they accessed to site on and in limited in size.
09-19-2006, 05:22 AM
This can be done in two ways:
1. using Cookies
2. using a file/database for storing users favourite.
1. If you are using cookies you can implement this particular item even without a user login process but as you know you can't rely fully on cookies since it resides in the customer PC they can remove that any time they wish. So if you keep the favourite property list in cookies in customer computers most probably you won't be able to display that when the customers visit your site next time.
2. The next method is you can go for a storage mechanism either using files or using database. Files means text files, xml files, etc will do. As you mentioned in your posting that you have a MS-Access Database there you can go for database.
In order to implement this you need some identification from the user point of view this can be done using a user registration. Try to make a simple user registration so that users won't get frustrated while doing the registration. After the user registration users will get some email with a confirmation link in it once they click on it, the registration process will end.
Then the users has to log into the site once they do that they will get a private area that is meant only for members where they can view certain links using which they can save/view/delete their favourite properties.
For a first tiime users you need not have to enable view and delete links as they are going to save a new list there. Once they select at least one property you can enable these links.
Now in the save section you'll list all the details about the properties along with a check box for selecting their favourite properties after selecting the necessary/favourite properties they'll press a submit button and the selected values will be stored into the database using ASP you can do this job.
In the view section, this is again an ASP page the script access the database rather a table in which you've stored the details about the user's favourite properties, you'll retrieve all the favourtie properties of a user and display that there.
In the delete section which can be done using ASP you'll retrieve all the favourite properties of a particular user and list there with a check box for selecting the item which the user wants to remove, after the selection he/she presses the submit button the selected values wll be removed from the database.
As far as database section is concerned there will be a users table and a favorite_property table. Users table contains all the details about the users that is username, password, email, etc. This table has a primary key username means username is one such field where there won't be any valud duplication. Each record has a unique username.
In the favorite_property table we can keep the username as the foreign key so that we can map the users table and this table. In other words we can map a user with his/her own favourite properties.
You can use sessions for maintaining user sessions from sections/page to sections/pages.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.