At my page when a user click any book name from list, it will be send data a php query and after query that book page will be open at browser.
Now after php process it cannot redirect any book page. I tryed also redirect with echo("<script>location.href = 'http://myweb.com/$user';</script>"); and ob_start(); at top, But not work also. There is no blank space before & after php and have no error log also. Chrome network tools display sent data well to testpage.php and also open that book's page there. But browser dose not redirect at any page.
This is page button:
<a href="javascript: void(0)" id="'.$mypage.'" class="user"> '.$mypage.'</a>
JS script:
$(document).on('click', 'a.user', function(e){
var getID = $(this).attr('id');
$.post("../testpage.php?user=" + getID, function(){
});
});
Testpage.php
<?php
error_reporting(E_ALL);
require('db.php');
if($_REQUEST['user'])
{
global $db;
$user=$_REQUEST['user'];
//others all process
header("location: http://myweb.com/$user");
exit;
}
?>