Can you post the full code your using to produce that?
Printable View
Can you post the full code your using to produce that?
PHP Code:<?php
include('db_conn.php');
$queryget = mysql_query("SELECT * FROM xxx ORDER BY `date` LIMIT 3") or die("Error with query");
while ($row = mysql_fetch_array($queryget))
{
$name = $row['name'];
$type = $row['type'];
$nick = $row['nick'];
$format = $row['format'];
$filename = $row['filename'];
$date = $row['date'];
echo "
<table width='120px';>
<tr>
<td>
<img src='redirect_upload/$format' width='80px' height='70px' border='0'>
<font size='0.8' face='Verdana' color='blue'><b>
Pavadinimas: $name <br>
Idejo: $nick <br>
Data: $date <br>
Rusis: $type
</b></font>
</td>
</tr>
</table>
";
}
?>
To clarify, your issue is that you want to see:
http://localhostr.com/files/9614e8/capture.png
And not:
http://localhostr.com/files/b94c9a/capture.png
Remove all of the <br>'s
Try this:
Change the number in red above to however many images you want to display across. The above is not tested, but should work.Code:<?php
include('db_conn.php');
$queryget = mysql_query("SELECT * FROM xxx ORDER BY `date` LIMIT 3") or die("Error with query");
$count = 0;
?>
<table width="120px">
<tr>
<?php
while ($row = mysql_fetch_array($queryget)) {
/* I am not getting rid of these assigned variables just in case you use them later in the script */
$name = $row['name'];
$type = $row['type'];
$nick = $row['nick'];
$format = $row['format'];
$filename = $row['filename'];
$date = $row['date'];
?>
<td>
<img src='redirect_upload/<?php echo $row['format'];?>' width='80px' height='70px' border='0'>
<font size='0.8' face='Verdana' color='blue'><b>
Pavadinimas: <?php echo $row['name'];?> <br>
Idejo: <?php echo $row['nick'];?> <br>
Data: <?php echo $row['date'];?> <br>
Rusis: <?php echo $row['type']; ?>
</b></font>
</td>
<?php
echo ($count % 3) ? '</tr><tr>' : '';
$count++;
}
?>
</tr>
</table>
Hope this helps.
@fg123
<br>'s just manage looking of my image and text, but everything is in while and it will do 3 times. you cant change the way how they will look in webpage by deleting <br>'s
Auriak, please take a look at mine and thetestingsite's posts above.
it works! THANKS :)