title: How to send data between ajax and php in secure way?
body: <p>I have <em>index.php</em>, <em>ajax.js</em> and <em>process.php</em> (where I get my AJAX data).</p>
  
  <p>I am using AJAX this way:</p>
  
  <pre><code>var = $('user_id').val();
  
  $.ajax({
      url     : "somefile.php",
      method  : "GET",
      data    : {'user_id' : user_id},
      cache   : false,
      success : function(data) {
            // do something with "data"
      }
  );
  </code></pre>
  
  <p>User_id I receive from PHP file:</p>
  
  <pre><code>    &lt;input value="&lt;?php echo $user_id; ?&gt;" id="user_id" /&gt;
  </code></pre>
  
  <p>What do I need to do for increasing security?</p>