The php web video script that I’m using has the capability to search for a video, select it, then select ‘proceed’ to view.
After logging-in and searching, selecting a video choice, and then ‘proceed’ is selected, this error appears “Something went wrong. Please Log-In!!”
The js looks like this:
...
function PT_MultipleBuyVideo() {
var checked = getSelectedVideos();
if (!checked) { return false; }
swal({
title: "",
type: "info",
html:"Proceed",
showCancelButton: true,
cancelButtonText: "Close",
customClass: 'sweetalert-lg',
confirmButtonText:'Proceed'
}).then(function(){
$.ajax({
url: PT_Ajax_Requests_File() + 'aj/buy-video',
type: 'POST',
dataType: 'json',
data: {id:checked},
}).done(function(data){
if (data.status == 200) {
for (var i = 0; i < checked.length; i++) {
var button = $("button[data-action='multiple_select_button'][data-id='" + checked[i] + "']")
buttonMultipleSelectingStyle(button, 'purchased');
}
swal({
title: "Success",
type: "success",
html:"",
showCancelButton: true,
cancelButtonText: "Close",
customClass: 'sweetalert-lg',
confirmButtonText:'Go To Video(s)'
}).then(function(){
window.location.href='/paidvid';
});
} else {
if (data.error_num == 1) {
swal(
'Error!',
'zero balance',
'error'
);
} else {
swal(
'Error!',
'Something went wrong. Please Log-In!!',
'error'
);
}
}
}).fail(function() {
swal(
'Error!',
'Something went wrong. Please try again later',
'error'
);
})
});
}
...
If this is at all helpful, here is the beginning php looks like this:
<?php
ob_start();
if (IS_LOGGED == false) {
$data = array('status' => 400, 'error' => 'Not logged in');
echo json_encode($data);
exit();
}
...
Any ideas on what I might look into regarding why a ‘please log in’ error appears after logging-in, is welcomed.