php callback function to next page

I'm using a widget that allow me to execute a callback php function after some events.I want to have a php function that will allow me to go to the next page using the \[code\]GET\[/code\] method.From\[code\]mypage.php?page=1\[/code\]To\[code\]mypage.php?page=2\[/code\]To\[code\]mypage.php?page=3\[/code\]and so on...I tought that something like\[code\]$page = mysql_real_escape_string($_GET['page']); // ==0 if no $_GET['page']function next_page($page) { header('Location: mypage.php?page='.++$page.'');}\[/code\]I know that using header could be tricky. That might be obvious but I'd prefer something reliable and scalable. Maybe if I could execute a \[code\]javascript.location\[/code\] script. Any suggestions?
 
Back
Top