i uploaded 5image which is displayed in the respective rows and
columns.the first image is in the 1row,1coluumn the 3 image is in
the 1row 3clomn the 5image is in the 2row 2column.i want to echo
next when the 6image is uploaded and when i click next the same page
should show displaying the 7image which is just uploaded and is in the
1row and 1column
columns.the first image is in the 1row,1coluumn the 3 image is in
the 1row 3clomn the 5image is in the 2row 2column.i want to echo
next when the 6image is uploaded and when i click next the same page
should show displaying the 7image which is just uploaded and is in the
1row and 1column
Code:
<?php
$db_database = "files";
$dbconnect = @mysql_connect('localhost','user2','point')or die('could not connect');
mysql_select_db($db_database) or die('could not select database');
$query = "SELECT * FROM hotel ";
$result = mysql_query ($query) or die('query error');
echo '<table>';
$_counter = -1; // We start 'outside' the Matrix. Unlike Neo.
$_cols = 5; // 3 columns. Of the Ionic variety.
while( $line = mysql_fetch_assoc($result) )
{
$web = $line[web];
$present = $line[picname];
// Advance the counter and determine our 'position';
$_pos = ( ++$_counter % $_cols );
// Should we output a '<tr>'?
if( $_pos === 0 )
{
echo '<tr>';
}
// Output the URL.
echo "<td><img src='company/$present' width='70' height='68'/></td>";
// Should we output a '</tr>'?
if( $_pos === $_cols - 1 )
{
echo '</tr>';
}
}
if( $_counter % $_cols !== $_cols - 1 ){
do
{
echo '<td style="visibility: hidden"> </td>';
}
while( ++$_counter % $_cols !== $_cols - 1 );
echo '</tr>';
} echo '</table>';
Comment