[Help] NEXT & PREV button [Please]

[COLOR=DarkRed]Dear fellaz… i had something trouble in my prev & next btns.
shortly desc is… i wanna display the messages 1 page 1 messages. but how… oh… once again… the system is php + sql + flash…

[/COLOR] [COLOR=DarkRed]allright tis the code.

[/COLOR] [COLOR=DarkRed]for the next buttons :

on (release) {
    if(current.text == total.text) { return; }
    loadMyData(Number(current.text));
}

[/COLOR] [COLOR=DarkRed]for the prev buttons :

on (release) {

    loadMyData(Number(current.text))-1;
}

[/COLOR] [COLOR=DarkRed]and here’s the frame script…

// di frame 1
loadMyData = function(n){
     datanya = new LoadVars();
     datanya.startid = n;
     datanya.onLoad = function(){
      panggil();
    };
    datanya.sendAndLoad("gbdata.php",datanya,"POST");
}
panggil = function(){    
    name.text = datanya.name;
    email.text = datanya.email;
    url.text = datanya.url;
    msg.text = datanya.msg;
    total.text = datanya.total;
    current.text = datanya.current;
};
// load data pertama
loadMyData(0);

[/COLOR] [COLOR=DarkRed]
and here’s the php script…

<?
include("dbconnect.php");

$qry = mysql_query("SELECT id FROM book");
$totalRec = mysql_num_rows($qry);

$getnews = mysql_query("SELECT * FROM book ORDER BY id LIMIT $_POST[startid], 1");
while($r=mysql_fetch_array($getnews)){
extract($r);
print("&name=$name");
print("&email=$email");
print("&url=$url");
print("&msg=$msg");
print("&total=$totalRec");
print("&current=$id");
}

?>

[/COLOR] [COLOR=DarkRed]The case is… i cant back to the previous messages.
thanks for your attentions and sorry for my english :smiley:
[/COLOR]