If my php string is like this. $ResponseG is my string.
$responseG = $_SESSION['id']." | ";
$responseG .= $_SESSION['type']." | ";
$responseG .= $_SESSION['username']." | ";
$responseG .= $_SESSION['last_active']." | ";
$responseG .= $_SESSION['last_login']." | ";
Which would be something like this.
2 | user | username | time1 | time2
Here is the Ajax
if(RequestObject){
RequestObject.open("POST", "calls/checkLog.php");
RequestObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
RequestObject.onreadystatechange = function(){
if(RequestObject.readyState == 4 && RequestObject.status == 200){
if(RequestObject.readyState == 4){
if(RequestObject.responseText !== "Username or Password are Invalid!"){
if(RequestObject.responseText !== "Username and Password are Required to Continue."){
window.location.replace("http://folder/members.php");
}else{document.getElementById('alertLog').innerHTML = RequestObject.responseText;}
}else{document.getElementById('alertLog').innerHTML = RequestObject.responseText;}}}}
var dataStringA = document.getElementById('inputaID').value;
var dataStringB = document.getElementById('password').value;
var data = dataStringA+'|'+dataStringB+'|';
RequestObject.send("data=" + data);}
return false;}
In this section i was wanting to sent the string to the redirected URL How do i send the php string to the members.php page
window.location.replace("http://folder/members.php");
Please no jQuery. The solution must be in native Javascript. Thanks in Advance.
window.location.replace('<?php echo $url; ?>');window.location.replace('http://folder/members.php?data='+data);