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 8376267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:23:22+00:00 2026-06-09T15:23:22+00:00

I am using $.post() to input some data into a server. Within the ajax

  • 0

I am using $.post() to input some data into a server. Within the ajax file I want to add a 1 to a variable containing a number. However, when the data is put into the server, instead of adding a 1 it instead puts 1. I feel stumped by this. What am I doing wrong. I swear for a second I got it to work, then next thing I know it stops working. Here is the code.

$liker = $_POST['likes'];

$likes = $liker + 1; 

send_data_to_server($likes);

Update

I have figured out that the likes is not being sent through the ajax post. I will try to troubleshoot a solution since I see the jquery code is not acting right. Here is the code below if anyone wants to give it a shot while I troubleshoot it on my own.

$('#submitter').click(function() {
    var search_term = $('#band_request').val();
    $.post('ajax_searchlike.php', {
        search_term: search_term
    }, function(data) {
    /*this section is where I know the problem is
      $('#like_temp_holder').append(data);
      });
      var likes = $('#like_temp_holder').val();
      */
        $.post('ajax_send_band_request.php', {
            likes: likes
        }, function(data) {
            $(data).appendTo("#response_from_request_verification");
        });
    });​

< /script>
    <div id="like_temp_holder"></div>
    <div id = "response_from_request_verification"></div>​
  • 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-06-09T15:23:23+00:00Added an answer on June 9, 2026 at 3:23 pm

    This was my fault. The first .post() is pointless. I attached the first ajax file to the second and got the job done. I like to go AJAX overboard. Lesson learned: why make multiple AJAX calls when you can simply do one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im submitting Data to a php file via AJAX using POST. It worked fine
passing post data using cURL requires that the name of the input. However, I
How can I add parameters to a post request using .post or .ajax. I
I am using jquery post to submit data on server and data having json
I am trying to post back some data using a viewmodel i have created
i'm using div content editable html to get value from input keyboard to post
I used this example (http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/) to upload file from android device to server, it
I'm using some Javascript I found from a post on StackOverflow. When I start
I'm trying to do some really basic AJAX using PHP & jQuery, but for
I am wanting to use the AJAX function via jQuery to return some data

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.