
January 13th, 2004, 02:13 PM
|
|
Junior Member
|
|
Join Date: Jan 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
2 Thumbs up
Ok I'm a bit late here
However I wan't to highlite SilkySmooth's excelent work
Unless you edit the tutorial, you use an excelent easy to follow coding style  I would like to see in action the shocked one he!
I'm new to PHP, start reading a couple weeks ago. I read the tutorial and start to write my code...save...bam works!
As of implemented security and other relevant functionality. Isn't a tutorial made for beginner? unless it's marked as advanced. When you look for some script help did you try to get a whole website for free?
Here is my contribution to the tutorial
PHP Code:
//Find out the current page
if( $start >= $per_page ){
$currentPage = $start / $per_page + 1;
}else{
$currentPage = 1;
}
$pages = $totals / $per_page;
if ( $pages > 1 ){
for( $b = 0,$c = 1; $b < $pages; $b++, $c++){
$res1 = $per_page * $b;
//Do not link if it's the current page
if( $c == $currentPage ){
echo "[".$c."] \n";
}else{
echo "[<A href=\"yourpage?start=".$res1."\">".$c."</A>] \n";
}
}
}
Keep up the good job Silky boy!
|