how to arrange image echo from database and increment a page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simon2x1
    New Member
    • Dec 2008
    • 123

    #1

    how to arrange image echo from database and increment a page

    how can i arrange image that i echo from the database to be in 5column
    and 2 row that is if i have 5 image that is echo on a page the next image
    that will be added should be in the second row and second column the next
    one will be in the second row and third column and also i want the page to
    increment after clicking next to display the next 10image.

    Code:
    <?php
    $db_database = "files";
    $db_host = "localhost";
    //conecting to and select datebase
    $dbconnect = @mysql_connect('localhost','user2','point')or die('could not connect');
    //echo "connected successfully <BR><BR>";
    mysql_select_db($db_database) or die('could not select database'); 
    
    	$query = "SELECT * FROM stored ";
    	$result = mysql_query ($query) or die('query error');
    
    	$count = 0;
    	while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
    	$web = $line[web];
    	$present = $line[picname];
    	echo "<a href= 'http://$web' target = '_blank'><img src='company/$present' width='70' height='68'/></a> ";
    	$count++;
    }
    	
    ?>
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Have a look at this thread.

    Comment

    Working...