The result I'm getting in my web page is the following : <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5-> <-6-> <-7-> <-8-> <-9-> <-0-> <-1-> <-2-> <-3-> <-4-> <-5->#!c:/xampp/perl/bin/perl.exe use warnings; use CGI; use Time::HiRes qw(gettimeofday); my $query = CGI->new; my $dir = "C:/Users/41786/OneDrive/Documents/recordz1/"; print $query->header; test(); sub test { my $counter = 10000; #Should be ge from db; my $string = ""; open (FILE, "<$dir/test2.html") or die "cannot open file $dir/test +2.html"; my $content = ""; my $nb_page = round ($counter / 40, 1);#Number of objects display +ed per page. for (my $i = '0'; $i < $nb_page+ 1;$i++) { my $n2 = $i %= 10; $min_index += 40; $string .= "<a href=\"/cgi-bin/recordz.cgi?lang=FR&session +=1&page=historique&article=1amp;min_index=$min_index&max_inde +x=40\" ><-$n2-></a>  "; $nb_page--; } while (<FILE>) { s/\$ARTICLE{'index'}/$string/g; $content .= $_; } print $content; close (FILE); } sub round { my $n = shift || ''; my $r = sprintf("%.0f", $n); return $r; }
In reply to Re^12: Need help with pagination
by *alexandre*
in thread Need help with pagination
by *alexandre*
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |