Thanks for answer, but seems I do not understand
At the moment I have such code
hr.onreadystatechange = function() {
if(hr.readyState == 4 && hr.status == 200) {
var return_data = hr.responseText;
document.getElementById("status").innerHTML = return_data;
[B]window.location = "login-success.php";[/B]
}
}
It means in each case when visitor click login button, the visitor is redirected to login-success.php
What do i need to change/add to get visitor redirected only if php $variable==1; php is in other file....