Paging and edit category status
- by jasmine
For edit home status of category I have a link:
<span class=\"ha\" title=\"Active in Homepage\">Active in Homepage</span><a href=\"?page=homestatus&id={$row['id']}\" class=\"hp\" title=\"\">Passive in home page</a>
and function:
function homestatus() {
$ID = mysql_real_escape_string($_GET['id']);
$query = "UPDATE category SET home = 0 WHERE id= $ID ";
$result = mysql_query($query);
if (mysql_affected_rows () == 1) {
header('Location: index.php?page=categories');
}
}
Everything works fine but there is paging :
/index.php?page=categories&pg=2
I want that an item located in pg=2, redirected to index.php?page=categories&pg=2
How can I do this? Thanks in advance