I want it to be done like the picture I posted.
X substitute the image.




Posted 16 July 2012 - 10:23 AM
<table border="1">
<?php
$sql = "SELECT * FROM images ORDER BY idimages DESC ";
$result = $mysqli->query($sql);
if ($result->num_rows != 0)
{
$counter=0;
while ($row = $result->fetch_array(MYSQLI_ASSOC))
{
$counter++;
if($counter == 1){
?>
<tr>
<td><img src="img/<?php echo $row['photo']; echo $row['idimages'] ?>" width="200" height="280" /></td>
<?php
}
if($counter == 2){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
Posted 16 July 2012 - 10:26 AM
<body>
<? echo $me['name']?>
<table border="1">
<?php
$sql = "SELECT * FROM images ORDER BY idimages DESC ";
$result = $mysqli->query($sql);
if ($result->num_rows != 0)
{
$counter=0;
while ($row = $result->fetch_array(MYSQLI_ASSOC))
{
$counter++;
if($counter == 1){
?>
<tr>
<td><img src="img/<?php echo $row['photo']; echo $row['idimages'] ;?>" width="200" height="280" /></td>
<?php
}
if($counter == 2){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
if($counter == 3){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
</tr>
<tr>
<?php
}
if($counter == 4){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
if($counter == 5){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
if($counter == 6){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
</tr>
<tr>
<?php
}
if($counter == 7){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
if($counter == 8){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
<?php
}
if($counter == 9){
?>
<td><img src="img/<?php echo $row['photo']; ?>" width="200" height="280" /></td>
</tr>
<?php
}
}
}
?>
</table>
</body>
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
