Jump to content

changing row of numbers to dropdown box


tjhilder

Recommended Posts

******** SOLVED ********

 

I managed to figure it out, I used some javascript code I got from my javascript book.

 

**************

 

Hi,

 

using [a href=\"http://www.phpfreaks.com/tutorials/43/5.php\" target=\"_blank\"]this tutorial on pagination[/a] I wanted to change the numbers like previous 1 2 3 next to something more like...

 

previous [dropdown box] next

 

but with it having selected the one you're already on. any help would be great, I imagine it would be changing this part:

    for($i = 1; $i <= $numofpages; $i++){
        if($i == $page){
            echo($i." ");
        }else{
            echo("<a href=\"$PHP_SELF?page=$i\">$i</a> ");
        }
    }


    if(($totalrows % $limit) != 0){
        if($i == $page){
            echo($i." ");
        }else{
            echo("<a href=\"$PHP_SELF?page=$i\">$i</a> ");
        }
    } 

 

but i'm not sure what I would have to do.

 

some help would be great :)

 

thanks in advance.

 

--

TJ

Link to comment
https://forums.phpfreaks.com/topic/3101-changing-row-of-numbers-to-dropdown-box/
Share on other sites

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.