<div class="grid--cell fl1 lh-lg">
<div class="grid--cell fl1 lh-lg">
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, <a href="/help/reopen-questions">visit the help center</a>.
</div>
</div>
</div>
<div class="grid--cell mb0 mt8">Closed <span title="2013-05-16 00:04:26Z" class="relativetime">6 years ago</span>.</div>
</div>
</aside>
anyway for set session when remote login with ajax .
this is my code
var result = null;
var scriptUrl = "http://www.site.com/login.bs";
$.ajax({
url: scriptUrl,
type: 'post',
data: ({txtTitle : 'tt1', txtText : 'tt2'}),
dataType: 'json',
async: false,
success: function(data) {
alert("success");
},
error: function (err) {
alert("error");
}
});
in target page when login session[user] set . but when i refresh page alert error .
target code
if($_POST[txtTitle]=='tt1' && $_POST[txtText]=='tt2')
{
$_SESSION[user]='ok';
}
</div>
On the backend, the javascript is expecting some sort of a json response. dataType: 'json'
Try:
header('Content-type: application/json');
echo json_encode(array());