--0-141590419-1212593019=:87821
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi,=0ACould any one please help me with Page Navigation. I have done Next a=
nd Previous page Navigation but confused on printing page numbers (1,2,3,4)=
and hyperlink them. Below is the code which i'm halfway on but it only pri=
nts "1" with no hyperlink where as I have 11 pages, if i print $noPages.=0A=
Could you please correct where i'm mistaking.=0A=A0$result =3D safe_query("=
select count(*) FROM gig g, venue v WHERE g.gigName LIKE '%".$gig_name."%' =
");=0A=A0$noEntries =3D mysql_num_rows($result);=0A=A0$noPages =3D ceil($no=
Entries / $limit);=0A=A0=A0$currentPage =3D 0;=0A=A0if(isset($_GET['pag']) =
&& =0A=A0=A0=A0 is_numeric($_GET['pag']) && =0A=A0=A0=A0 $_GET['pag'] > 0 &=
& =0A=A0=A0=A0 $_GET['pag'] < $noPages){=0A=A0=A0=A0=A0=0A=A0=A0=A0=A0=A0=
=A0=A0 $currentPage =3D $_GET['pag'];=0A=A0}=0A=A0$start =3D $currentPage *=
$pageLimit;=0A=A0=A0$sqlTotal =3D "select * FROM gig g, venue v WHERE g.gi=
gName LIKE '%".$gig_name."%' ".$start.",".$limit;=0A=A0for($a =3D 0; $a < $=
noPages; $a++){=0A=A0=A0=A0 if($currentPage =3D=3D $a){ =0A=A0=A0=A0=A0=A0=
=A0=A0 echo($a+1);=0A=A0=A0=A0 }else{=0A=A0=A0=A0=A0=A0=A0=A0 echo '<a href=
=3D"'.$_SERVER['PHP_SELF'].'?spag=3D'.$a.'">'.($a+1).'</a>';=0A=A0=A0=A0 }=
=0A=A0=A0=A0 if($a < $noPages - 1){=0A=A0=A0=A0=A0=A0=A0=A0 echo '-';=0A=A0=
=A0=A0 }=0A}=0A=0A=0A
--0-141590419-1212593019=:87821--
