SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    I need a simple ajax example

    I have thousands of testimonials in my database. Here is just one example:

    http://www.oil-testimonials.com/essential-oils/2620

    I want my registered users to have the ability to add some of these testimonials to their "favorites" list. This will involve creating a new table that links the user ID to the testimony ID.

    I've seen on some sites, like amazon.com, where you can click a link to say that a review has been helpful. Instead of the whole page reloading, I think it uses ajax to update the database. I would like to offer something similar on my site.

    Does anyone have a very basic example they could share on how this could be accomplished? Or maybe a website you could point me to?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Google is going to be your friend for this. Just find one that shows how Ajax works to send the request. Then figure out what information you need to pass and write the script that updates the database.

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Google is going to be my friend for this? I don't understand.
    Convert your dollars into silver coins. www.convert2silver.com

  4. #4
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Sitepoint's very own Ajax tutorial should get you going...

    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  5. #5
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by busboy View Post
    Google is going to be my friend for this? I don't understand.
    There are tons of Ajax examples out there already. It's not practical for someone to create one from scratch.

    If you have not googled, do so now. If you have and you still don't understand them, then it's time to come and ask questions about the specific things you don't understand.


Bookmarks

Posting Permissions

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