title: PHP: Reloading the captcha image from javascript
body: <p>I have a user registration form in PHP .I put captcha image check in the page.I used it like this </p>
  
  <pre><code>&lt;img src="captcha.php" alt="Enter this text in the adjacent text box" id="imgCaptcha" /&gt;
  </code></pre>
  
  <p>and in my javascript i will validate this with the same number which is generated in the image (from captcha.php page) . That number was set in a session variable too. Now i want to reload the image to another image from my javascript , if the validattion fails .Is there any way to do so ?</p>
  
  <p>In my captcha.php page,I am creating a Number randomly and then creating an image using imagejpeg. I set this number (in the image) to as session varible also</p>
  
  <p>Please guide me to solve this </p>
  
  <p>Thanks in advance</p>