I have a combination of jQuery POST() function with PHP.
jQuery:
token = $('input[name=signin-token]').val();
$.post('controller/create-captcha.php',{
signin_token: token
}, function(data){
$('#captcha').attr('placeholder',data);
});
PHP:
<?php
session_start();
if (isset($_POST['signin_token']) && isset($_SESSION['signin-token'])
&& $_POST['signin_token'] == $_SESSION['signin-token']) {
$rand1 = rand(1,10);
$rand2 = rand(1,10);
$_SESSION['captcha'] = $rand1+$rand2;
echo $rand1.' + '.$rand2. ' =';
}
?>
This code is working well in both Chrome and Firefox. But IE can not fetch the result at all. What is the problem and how can I solve it?