| | |
Next page creator
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2006
Posts: 2
Reputation:
Solved Threads: 0
I think it's not effective way if we create an array of all the images and then echo out the array.
Maybe you can use below algoritma (below are not working codes) :
$Page = $_GET['page'];
$ImagesPerPage = 10; //number of images per page
$StartImage = $Page * $ImagesPerPage;
$q = "SELECT * FROM table_images ORDER BY id ASC LIMIT $StartImage, $ImagesPerPage";
/*
Show your Images here
*/
//Paging here:
echo "<a href='$PHP_SELF?page=". ($page - 1) ."'>previous</a>";
echo "<a href='$PHP_SELF?page=". ($page + 1) ."'>next</a>";
Maybe you can use below algoritma (below are not working codes) :
$Page = $_GET['page'];
$ImagesPerPage = 10; //number of images per page
$StartImage = $Page * $ImagesPerPage;
$q = "SELECT * FROM table_images ORDER BY id ASC LIMIT $StartImage, $ImagesPerPage";
/*
Show your Images here
*/
//Paging here:
echo "<a href='$PHP_SELF?page=". ($page - 1) ."'>previous</a>";
echo "<a href='$PHP_SELF?page=". ($page + 1) ."'>next</a>";
![]() |
Similar Threads
- $40,000 Holiday Affiliate Ad Contest (Ad Space for Sale)
- What is your PR? (Search Engine Optimization)
- Home page always changing (Viruses, Spyware and other Nasties)
- estimated prices on websites (IT Professionals' Lounge)
- Can't Remove About:Blank Page (Viruses, Spyware and other Nasties)
- cannot find server/page or DNS error (Viruses, Spyware and other Nasties)
- Yet another IE home page hijacking (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: Simple Banned Words Filter
- Next Thread: php_write in php5 gives cannot read error
Views: 1570 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database dataentry date directory display download dynamic echo email error file files folder form forms freelancing function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap sorting source space speed sql structure syntax system table tutorial tutorials update updates upload url validation validator variable video web xml youtube zend





