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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:11:51+00:00 2026-05-26T07:11:51+00:00

Im developing a javascript/php/ajax application and have stumbled across some problems. Im confident at

  • 0

Im developing a javascript/php/ajax application and have stumbled across some problems.

Im confident at javascript and ajax but my php is a little rusty.

My aim is to get a json file from the server, modify it using javascript, and then save this modified json back to the server.

After some research it was obvious that the modified json file must be sent to a php file, this php file will then do the saving.

HOW do i send a json string from javascript to php? OR how do I get the php file to pick up the json variable from the javascript?

im assuming the php will be something like:

<?php 
    $json = $_POST["something"];
?>

but how do i send or “post” the javascript variable to the php file?

I was thinking about creating a hidden html form, setting a hidden textbox to the json string, then posting the html form

But surely there must be a way without including the html middle man?

Im looking for answer WITHOUT jQuery. Seeing as this is an application i would like a relieve the dependancy of jQuery.

  • 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-26T07:11:51+00:00Added an answer on May 26, 2026 at 7:11 am

    You would need to create a XMLHttp-Request like this:

    xmlhttp.open( "POST", url, false );
    xmlhttp.setRequestHeader(
        'Content-Type',
        'application/x-www-form-urlencoded; charset=UTF-8'
    );
    xmlhttp.send("data=yaystuff!")
    

    So you can send it. In PHP just get the $_POST[‘data’] variable and do some json_decode() on it, if you send JSON 🙂

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

Sidebar

Related Questions

I am developing a DHTML/Javascript application which relies on some advanced features (DOM manipulation,
I am developing one web application using (PHP JavaScript). I stuck to one point
I'm developing an application in PHP and Javascript and I need to set up
I am developing some client side Javascript that is using some JSON web services
I am developing a RIA application with JavaScript in Eclipse. How can I enable
I am currently developing a site and have a need for a javascript-based carousel/slider
I'm developing a PHP application to retrieve the list of contacts from a GMail
My focus is on html,PHP,mysql, javascript, css, ajax because that's what many websites need.
I'm developing a web site, which would make use of PHP, Javascript (JQuery) and
I am developing a website using PHP. I use Javascript/jquery to control/regulate user input.

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.