Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:29:21+00:00 2026-05-25T10:29:21+00:00

I am at a total loss with this, I need to create a like

  • 0

I am at a total loss with this, I need to create a “like button” like the facebook like button, I have tried to use jquery to do this but havent got anywhere. I need to basically add a row to a mysql db and then update the number of “likes” next to the button ont he page all without a refresh.

Can anyone help with this as I am totally stuck as i dont know javascript or jquery 🙁

Hope someone can as its been driving me nuts 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:29:22+00:00Added an answer on May 25, 2026 at 10:29 am

    This is the basics I think?

    Your Button

    <div id="likeMe">Like This</div>
    

    Your call back div

    <div style="display: none" class="addlike">loading...</div>
    

    Your Javascript

    <script type="text/javascript"> 
    $("#likeMe").click(function() { 
    $(".addlike").delay(10000).load("savelike.php?page_id=<?php echo $p;?>&user=<?php echo $user_id;?>&msd=" + new Date().getTime());  
    });
    </script>
    

    Your php save page
    savelike.php

    $page_id = $_REQUEST["page_id"];
    $user = $_REQUEST["user"];
    $sql ="INSERT INTO MYLIKES SET user = '$user' && page_id = '$page_id'";
    $query = mysql_query($sql) or die("Cannot query the database." . mysql_error());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a total loss. I have this function to read the Twitter Json. The
I've never had this problem before, I'm at a total loss. I have a
Total newbie question but this is driving me mad! I'm trying this: myInt =
I would like to add talkPrice, textPrice and dataPrice and have the total be
This is pretty simple but I'm at a loss: Given this type of data
Total noob question, but here. CSS .product__specfield_8_arrow { /*background-image:url(../../upload/orng_bg_arrow.png); background-repeat:no-repeat;*/ background-color:#fc0; width:50px !important; height:33px
Total n00b to C# and events although I have been programming for a while.
I'm a total newbie, but I was writing a little program that worked on
I'm hoping someone can help me with this as I'm at a loss. I'm
This seems like the simplest thing in the world and I'm ready to pull

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.