javascript - php callback function to next page -


i'm using widget allow me execute callback php function after events.

i want have php function allow me go next page using get method.

from

mypage.php?page=1 

to

mypage.php?page=2 

to

mypage.php?page=3 

and on...

i tought like

$page = mysql_real_escape_string($_get['page']); // ==0 if no $_get['page'] function next_page($page) {    header('location: mypage.php?page='.++$page.'');} 

i know using header tricky. might obvious i'd prefer reliable , scalable. maybe if execute javascript.location script. suggestions?

$page = 0; if(isset($_get['page']))     $page = intval($_get['page']);  function next_page($page) {    $page ++;    header('location: mypage.php?page='.$page);    exit; } 

header shouldn't considered tricky. have make sure no output has been sent browser before using it.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -