Jump to content

What is The Code To Create Link For Next/Previous Page ?


Amman-DJ

Recommended Posts

i have a php script that index content of other sites

 

and the are link for the page

ex:

 

{1} {2} {3} ..etc

 

i want to make a link that takes u direct to the next page

 

i tried to open the file with macromedia DearmWeaver but it didn't detect the numbers of the pages as php code

 

and i opened with frontpage and it works , but is there a way to make Next page link in html ?

 

The link of the pages is like this ( go.php?page=3 )

 

 

anybody can help ?  ???

First Make An Array Like this

$page[] = "page1_loc.php";
$page[] = "page2_loc.php";
$page[] = "page3_loc.php";
$page[] = "page4_loc.php";
$page[] = "page5_loc.php";
$page[] = "page6_loc.php";

And then

<?php
$curr_indx = array_search($_SERVER['PHP_SELF']);
for($i=0;$i<=$curr_index;$i++)
  {
    $prev_page[] = $pages[$i];
  }
for($i=$curr_index;$i<=count($pages)-1;$i++)
  {
    $next_page[] = $pages[$i];
  }
?>

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.