dcsimg
www.webdeveloper.com
Results 1 to 11 of 11

Thread: "Add to Favorite" Button

  1. #1
    Join Date
    May 2010
    Posts
    4

    "Add to Favorite" Button

    Hi Everyone,
    I am a student studying web development. I am creating a website with a photo gallery. When you visit the photo gallery page there are thumbnails you can click to view a larger image on the same page. Beside each image will be an add to favorites button.

    My Question is :
    How can i have an add to favorites button that the user will click on to take them to a login/register page where they can maintain/manage all their favorites. I have been looking for a script that does this for weeks with no luck. I would really appreciate it if someone is able to help me out with this as it is driving me nuts. Thank you so much.

  2. #2
    Join Date
    May 2010
    Posts
    123
    Quote Originally Posted by sunlight444 View Post
    Hi Everyone,
    I am a student studying web development. I am creating a website with a photo gallery. When you visit the photo gallery page there are thumbnails you can click to view a larger image on the same page. Beside each image will be an add to favorites button.

    My Question is :
    How can i have an add to favorites button that the user will click on to take them to a login/register page where they can maintain/manage all their favorites. I have been looking for a script that does this for weeks with no luck. I would really appreciate it if someone is able to help me out with this as it is driving me nuts. Thank you so much.
    Hi, do you know much PHP and MYSQL?
    If so, you could create a favourites table in your database listing a user ID and photo ID.

    Then on the user's favourites page you could show all all of the images with the IDs that have been used in the favourites table with the user ID (if that sentence makes sense).

  3. #3
    Join Date
    May 2010
    Posts
    4
    Quote Originally Posted by DexterMorgan View Post
    Hi, do you know much PHP and MYSQL?
    If so, you could create a favourites table in your database listing a user ID and photo ID.

    Then on the user's favourites page you could show all all of the images with the IDs that have been used in the favourites table with the user ID (if that sentence makes sense).
    Thanks for the response Dexter. I know how to create a Database and a table and that's pretty much it. Do you any tutorials for this i could follow.
    I really want to learn how to do.
    Thanks again for the reply.

  4. #4
    Join Date
    May 2010
    Posts
    123
    Alright, thats a good start.
    Have you ever created a relational database?

    http://www.w3schools.com/php/php_mysql_select.asp

    Some of the w3schools tutorials can be good for this sort of thing.

    I can give you some help with various aspects of this if you need any.

  5. #5
    Join Date
    May 2010
    Posts
    4
    Quote Originally Posted by DexterMorgan View Post
    Alright, thats a good start.
    Have you ever created a relational database?

    http://www.w3schools.com/php/php_mysql_select.asp

    Some of the w3schools tutorials can be good for this sort of thing.

    I can give you some help with various aspects of this if you need any.
    Thanks alot. I really appreciate it.
    I created a login/register page at http://kurzdesign.ca/login/
    The next step is to somehow attach the add to favorites link to the users profile so when they click on it, the favorite is saved to their profile. I am not very proficient in PHP but i want to learn how to do this.

    Thanks again Dexter.

  6. #6
    Join Date
    May 2010
    Posts
    123
    hmm I have never seen this before, is this code that you need to modify to create what you want?

    For the add to favourites it will just be a simple link to a page which will have the code in to actually add it to the database.

    I really think you should do a few of those w3schools database tutorials just to see how it all works then you will have it done in no time.

  7. #7
    Join Date
    May 2010
    Posts
    4
    Quote Originally Posted by DexterMorgan View Post
    hmm I have never seen this before, is this code that you need to modify to create what you want?

    For the add to favourites it will just be a simple link to a page which will have the code in to actually add it to the database.

    I really think you should do a few of those w3schools database tutorials just to see how it all works then you will have it done in no time.
    Yes i am going through the w3 tutorial you sent me and some other basic ones right now. Do you think there will be a php file needed for this as well. How do i know what goes in the php file?

    Thanks.

  8. #8
    Join Date
    May 2010
    Posts
    123
    Quote Originally Posted by sunlight444 View Post
    Yes i am going through the w3 tutorial you sent me and some other basic ones right now. Do you think there will be a php file needed for this as well. How do i know what goes in the php file?

    Thanks.
    Yeah there will be quite a few PHP files needed, dont worry though it is very easy to learn.

    You need PHP files for all of the various processes that you want your website to do e.g you will want one to output all of the images, you will want one to show a single image(where I imagine you are going to put your favourites link) you will need one to logout etc etc.

  9. #9
    Join Date
    May 2010
    Location
    Willoughby
    Posts
    1

    Thumbs up Thanks

    I was looking for this. I had about the same question for my site: biscuitsandgravyrecipe.net. And, I think this answered my question.

  10. #10
    Join Date
    May 2010
    Posts
    123
    Quote Originally Posted by vman92 View Post
    I was looking for this. I had about the same question for my site: biscuitsandgravyrecipe.net. And, I think this answered my question.
    Yeah the same technique can be applied to all sorts of things, not just a favourites sort of system.
    I made a bookmarks like application a while ago using a very similar technique.

  11. #11
    Join Date
    Aug 2012
    Posts
    1
    dexter morgan, i'm trying to set up a similar function for my website and i've been looking for people to help out. i'm not sure if this is the right place to go to but my business partners and I would be willing to hire you for any help you could give us.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles