I have a user registration form in PHP .I put captcha image check in the page.I used it like this
//img id="imgCaptcha" src="create_image.php"//
and in my javascript i want to validate this with the same number which is generated in the image (from create_image.php page) . That number was set in a session variable too. but when I get number from SESSION that time I get previous one generated number.but when I POST that page I get correct one generated by create_image.php from SESSION.
so,how can I get recently generated number without posting that page from SESSION?