How can I write the php locate variable code when redirect to right page! I have pagination and if I'm in second or 3rd page, and then process sending data to database using ajax like this code
<script type="text/javascript">
$.ajax({
type: "GET",
url: "action.php",
data: { status: "<?php echo $_GET['pid'];?>" }
})
</script>
and then redirect back to pagination.... I want to redirect back to page 2nd or 3rd page instead of first page.
I copied second page of pagination url address and I pasted into php location code is works great see the code...
header("Location: http://shopone/admin45/pagination/davetwo.php?cat=&rows=10&page=2");
See the code where it said ?cat=&rows10 mean number of row per page.
See &page=2 mean page 2
In local variable I know this is not right code but need help
header("Location: http://shopone/admin45/pagination/davetwo.php".($_GET['page'] ? '?page='.$_GET['page']:''));
How can i write the variable code to put variable for cat and page! to redirect into right page where left from pagination page!