Jump to content

Help -- PHP SELECT Script Web Page


evalid

Recommended Posts

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, then page 2...

 

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>

.

.

.

 

Link to comment
https://forums.phpfreaks.com/topic/107677-help-php-select-script-web-page/
Share on other sites

I assume the data is from a mysql table. if it is you have not shown us the query which retrieves the messages.

 

The web page doesn't have a mysql database. It only has 2 php web pages and a data directory. 

 

if you need some hosting where you have a cpanel and php and mysql and apache on the server ill give you some space for cheap or nothing depending on your site size

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.