Help in navigation

Started on the old forum in February 2010 · view the original in the archive · old links redirect here

#navigation

1 reply · 332 views · started 16 years ago · 1 min read

slowy Senior · 357 posts #1
if(1<$pgs)  
 {  
  echo"<div class=\"pagin\">";     
 if($pg>3){echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=1\">«</a></span>";}
{
  if($pg>1){$pp1=$pg-1;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&$pp1&cid=$cat[0]\"><</a></span>";}
}
      if($pg>=3){$pp2=$pg-2;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$pp2&cid=$cat[0]\">$pp2</a></span>";}
      if($pg>=2){$pp3=$pg-1;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$pp3&cid=$cat[0]\">$pp3</a></span>";}
      echo"<span class=\"current\">$pg</span>";
      if($pg<=$pgs&&$pg<=$pgs-1){$np1=$pg+1;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$np1&cid=$cat[0]\">$np1</a></span>";}
      if($pg<=$pgs-2){$np2=$pg+2;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$np2&cid=$cat[0]\">$np2</a></span>";}
      if($pg<=$pgs-1){$np3=$pg+1;echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$np3&cid=$cat[0]\">></a></span>";}
      if($pg<=$pgs-3){echo"<span class=\"pages\"><a href=\"view.php?action=vsites&pg=$pgs&cid=$cat[0]\">»</a></span>";}
      echo"</div>";
   }

here is $cats=MySQL_Query("SELECT * FROM cats;"); while($cat=MySQL_Fetch_Array($cats)) but not getting where to put. I tried but not getting exact result

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close