title: how to send json to php file to save on server
body: <p>Im developing a javascript/php/ajax application and have stumbled across some problems.</p>
  
  <p>Im confident at javascript and ajax but my php is a little rusty.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>im assuming the php will be something like:</p>
  
  <pre><code>&lt;?php 
      $json = $_POST["something"];
  ?&gt;
  </code></pre>
  
  <p>but how do i send or "post" the javascript variable to the php file?</p>
  
  <p>I was thinking about creating a hidden html form, setting a hidden textbox to the json string, then posting the html form</p>
  
  <p>But surely there must be a way without including the html middle man?</p>
  
  <p>Im looking for answer WITHOUT jQuery. Seeing as this is an application i would like a relieve the dependancy of jQuery. </p>