Can you post the full code your using to produce that?
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>
";
}
?>
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.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
auriaks (11-11-2009)
@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
Last edited by auriaks; 11-10-2009 at 06:19 PM.
it works! THANKS![]()
Bookmarks