Im doing a form POST submit from javascript to PHP and it works fine on desktop but doesnt post the values on iPhone? They're stored as PHP session variables in the PHP but it seems theyre not posting even out of session store. Has anyone seen this issue before?
Javascript:
var $form = $('<form method="POST" action="profile.php"></form>');
$form.submit(function () {
var input = $("<input>")
.attr("type", "hidden")
.attr("name", "email").val(email);
$(this).append(input);
return true;
});
$form.submit();
PHP:
if(isset($_POST['email']))
{
$myEmail = $_POST['email'];
$myEmail = $_SESSION["email"] = $_POST['email'];
$myEmail = $_SESSION["email"];
}
else{
$myEmail = $_SESSION["email"];
}
Works fine on desktop. No values at all on iPhone. Thanks.