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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:57:08+00:00 2026-06-11T02:57:08+00:00

I had a php file that did this: $recresults = array(‘dupes’ => $result, ‘total’

  • 0

I had a php file that did this:

$recresults = array('dupes' => $result, 'total' => $number2);
header('Content-type: application/json');
echo json_encode($recresults);

Then I modified the file to this:

$recresults = array('dupes' => $result, 'total' => $number2, 'thefield' => "WWW");
header('Content-type: application/json');
echo json_encode($recresults);

But when I checked google dev tools, network tab, I seen that it was not returning the last array element that I added thefield. If I attempt to use the variable for that element in my JavaScript I get undefined data.thefield.

So to see if changes were being being acknowledged by the server at all I tried changing my code to this:

$recresults = array('dupes' => $result, 'total' => $number2, 'thefield' => "WWW");
echo ("WTF SERVER?");

I also deleted type json on my ajax call. Well after checking I was right about the server not acknowledging my changes to the php file. The return code was still the json from the first code set. I tried an old trick of changing the php file’s name. Did not work. Tried rebooting server. No dice.

What can I do? The server is not returning any errors.

$.post(PROCESSORFILE, {"task": "csv_dedupe", "file_name": file_name, "column_dedupe":                                    elem}, function(data) {
                $("#message").replaceWith('<div id="message" class="nNote nSuccess hideit"><p><strong>CSV Deduped! </strong><span class="badge badge-important">' + data.thefield + '</span> duplicate<span class="label label-info"> ' + data.dupes+ '</span> found</p></div>')
            });

When I return stuff from the php file using json_encode I change the above JS $.post() to type json.

  • 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-11T02:57:09+00:00Added an answer on June 11, 2026 at 2:57 am

    Try the following, replacing ? with & depending on the content of your PROCESSORFILE variable.

    var cacheBuster = new Date().getTime() + Math.round(Math.random()*100000);
    $.post(PROCESSORFILE + "?t=" + cacheBuster, {"task": "csv_dedupe", "file_name": file_name, "column_dedupe": elem}, function(data) {
        $("#message").replaceWith('<div id="message" class="nNote nSuccess hideit"><p><strong>CSV Deduped! </strong><span class="badge badge-important">' + data.thefield + '</span> duplicate<span class="label label-info"> ' + data.dupes+ '</span> found</p></div>')
    });
    

    This is cache-buster code, to ensure a fresh copy of the php page is retrieved.

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

Sidebar

Related Questions

I had this setting in my php.ini file: error_reporting = E_ERROR|E_PARSE|E_CORE_ERROR|E_COMPILE_ERROR But I was
I have this problem where all URLs like context/path/file/anything/that/follows becomes context/path/file.php/anything/that/follows or context/path/file.xml/anything/that/follows .
I was looking at the php.net manual and it had this line of code:
I've never seen anything like this. File structure: somefolder/base.php includes/stuff.php includes/constants.php base.php: <?php require(../includes/stuff.php);
We have a simple php file that captures emails. It drops these emails into
We had a developer code for us, and he did it in php. When
I previously had this problem with an external file not running. I fixed this
Alright, currently I have my SWF hitting a php file that will go and
I had a working relationship with a Java server and a PHP server using
I have recently had a linux server compromised from bots uploading .php scripts and

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.