Paging and edit category status

Posted by jasmine on Stack Overflow See other posts from Stack Overflow or by jasmine
Published on 2010-04-03T19:16:58Z Indexed on 2010/04/03 19:23 UTC
Read the original article Hit count: 201

Filed under:

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

© Stack Overflow or respective owner

Related posts about php