andy8828
07-10-2008, 05:26 PM
Hello,
I have a web page which people can post their messages on it. The messages show on the page are from the old time to the recent time. You can select the pages from page 1 to the last page.
My question is how to change the messages order, so the message "page 1" show the most recent messages first instead the old messages. For example, the recent messages are in the page 1, page 2, then page 3...
Here is the web address URL: http://www.uswebcity.com/wish/wish.php .
And here is part ot the SELECT function in PHP script. Could you please tell me how to change(rewrite) the functions? Thank you.
<SELECT NAME="page" style="font-size: 7pt ;font-family: Verdana; background:#808080 url(''); color:#ececec"
onChange="ace.submit();" STYLE="BACKGROUND:#808080;COLOR:#ececec"> <?
if($wishnum%$show_num==0)
$zpage=(int)($wishnum/$show_num);
else
$zpage=(int)($wishnum/$show_num)+1;
for($i=1;$i<=$zpage;$i++){
if($page!=$i){
echo"<option value=$i>page $i</option>";
}
else{
echo"<option value=$i selected>page $i</option>";
}
}
?></SELECT>
...
__________________
Shopping, Music & Entertainment
>> www.USWebCity.com <<
I have a web page which people can post their messages on it. The messages show on the page are from the old time to the recent time. You can select the pages from page 1 to the last page.
My question is how to change the messages order, so the message "page 1" show the most recent messages first instead the old messages. For example, the recent messages are in the page 1, page 2, then page 3...
Here is the web address URL: http://www.uswebcity.com/wish/wish.php .
And here is part ot the SELECT function in PHP script. Could you please tell me how to change(rewrite) the functions? Thank you.
<SELECT NAME="page" style="font-size: 7pt ;font-family: Verdana; background:#808080 url(''); color:#ececec"
onChange="ace.submit();" STYLE="BACKGROUND:#808080;COLOR:#ececec"> <?
if($wishnum%$show_num==0)
$zpage=(int)($wishnum/$show_num);
else
$zpage=(int)($wishnum/$show_num)+1;
for($i=1;$i<=$zpage;$i++){
if($page!=$i){
echo"<option value=$i>page $i</option>";
}
else{
echo"<option value=$i selected>page $i</option>";
}
}
?></SELECT>
...
__________________
Shopping, Music & Entertainment
>> www.USWebCity.com <<