title: How to bring a json result into PHP
body: <p>I have some results from a fetch.php using json and I successfully brought all results to my bootstrap modal HTML screen. 
  When the Modal is being shown, I would like to run a MYSQL query using a value coming from the same json I used for the modal, however I can't put this value into a PHP variable to run the SQL query. 
  How can I get this?</p>
  
  <p>I am trying to bring the same value I input into the HTML textbox (modal), but it is not working. I also tried to use the value from json '$('#PCR').val(data.PCRNo);)', but nothing happen.</p>
  
  <p>This is the script to collect information from database using fetch.php file:</p>
  
  <pre><code>&lt;script&gt; 
  
    $(document).ready(function(){
          $('#table').on('click', '.fetch_data', function(){
            var pcr_number = $(this).attr('id');
  
            $.ajax({
              url:'fetch.php',
              method:'post',
              data:{pcr_number:pcr_number},
              dataType:"json",
              success:function(data){
  
                $('#PCR').val(data.PCRNo);
                $('#PCC').val(data.PCC);
                $('#PCR_Creation').val(data.Creation_Date);
                $('#PCR_Status').val(data.Stage);
                $('#Required_Completion').val(data.Required_Completion);
              }
            });
          });
        }); 
   &lt;/script&gt; 
  </code></pre>
  
  <p>This is the PHP code </p>
  
  <pre><code>&lt;?php
         //trying to get the value I have included on #PCR (textbox) which has ID='PCR' and name ='PCR' **
  
          $PCR= $_POST['PCR'];
  
         //running now the code to check if the database has the value and return the desired response to be shown **
  
          $sql1 = mysqli_query($dbConnected,"SELECT * FROM change_management.tPCN");
  
                 while ($row1 = mysqli_fetch_array($sql1)) {
                    if ($row1['PCRNo']==$PCR){
                    echo $row1['PCNNo'];
                    echo "&lt;br/&gt;";
                   }else{
  
                  }
                }       
  ?&gt;
  </code></pre>
  
  <p>I would like include value from this <code>val(data.PCRNo)</code> json return into the $PCR variable, so the MYSQL query is going to work</p>