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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:01:43+00:00 2026-06-15T02:01:43+00:00

I was working on a simple link that would initiate an ajax call. This

  • 0

I was working on a simple link that would initiate an ajax call. This worked as expected until our Ubuntu server got decommissioned; we have a new, ‘identical’ server. The problem occurs on the server side, when I examine what is in POST.
Expected echo of $_POST[“scan_date”] is: 2012-11-26

Actual echo is: 2012-11-26scan_date=2012-11-26

And this is the actual echo in the PHP code below.
The client side alert gives this: 2012-11-26 and that is what i expect.
So, it appears that something is happening on the server side. I expect the echo to be “2012-11-26” and not “2012-11-26scan_date=2012-11-26”

I can’t figure out why the POST data is getting munged up like that.

PHP:

$date = isset($_POST["scan_date"]) ? $_POST["scan_date"] : date("Y-m-d");
echo $date;  //produces 2012-11-26scan_date=2012-11-26 which is bad

JQuery:

var val = $(this).attr('value');
dateSelected = val.replace(/facterOption-/g, "");
dateSelected = $.trim(dateSelected);
alert(dateSelected);  //alerts 2012-11-26 which is good

$.ajax({
type: "POST",
dataType: 'json',
url: 'https://someurl',
data: {
scan_date: dateSelected
}
})

UPDATE: We have tried command line curl calls that were completely outside of the code framework for this PHP project, and the same result is being noticed. So maybe Apache has something to do with this.

Additionally, we discovered that adding a second POST parameter and value took care of this.

  • 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-15T02:01:44+00:00Added an answer on June 15, 2026 at 2:01 am

    This is an existing bug.

    https://bugs.php.net/bug.php?id=22773

    Solution is to:

    • Send another dummy name/value pair into the post
    • require > IE6
    • Use GET instead of POST if applicable
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be very simple, but its not working! I have this link on
Good Day, I have a simple working routine in Perl that swaps two words:
im working on a simple C++ HTTP server as a school project and I
I'm working on a simple webservice in django. This is my first web app
I'm a novice/beginner programmer having problems getting some simple client/server C code working. My
I am working on a simple accordion-like vertical menu: http://www.cybart.com/bscg/ Clicking on OUR SOLUTIONS,
I have a semi-working example that you can look at. This appears to work
I'm working on an AJAX based application that is dynamically loading in resources (external
Please see working code here: http://jsfiddle.net/hrnDG/6/ I would like to modify this code so
I would like to get a working example in PHP that parses a SOAP

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.