title: jQuery AJAX - POST data to IMG tag
body: <p><strong>file.php</strong></p>
  
  <pre><code>&lt;?php
    $variable = 'mainImage';
  ?&gt;
  
  &lt;div&gt;
    &lt;img src="image.php"&gt;
  &lt;/div&gt;
  
  &lt;input type="button" onClick=""&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>I am trying to do the following:</strong></p>
  
  <p>When the button is clicked <strong>$variable</strong> should be passed to <strong>image.php</strong> and the image should reload accordingly.
  Yes, i know we can update the <strong>src</strong> to <strong>image.php?variable=mainImage</strong>. ( $_GET  )</p>
  
  <p>But is it possible to send <strong>$variable</strong> through $_POST without refreshing the page, but refreshing only the image?</p>