image display in loop
Posted: Sat Jun 29, 2002 4:48 pm
so far, this is what i have:
<?php require_once('Connections/connection.php'); ?>
<?php
mysql_select_db($database_db, $db);
$query_Recordset1 = "SELECT * FROM test";
$Recordset1 = mysql_query($query_Recordset1, $db) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_db, $db);
$genre = "comedy";
$query_Recordset1 = "SELECT * FROM test WHERE genre = '$genre'";
$Recordset1 = mysql_query($query_Recordset1, $db) or die(mysql_error());
while($row_Recordset1 = mysql_fetch_assoc($Recordset1))
{
echo "<A href=backs/$back><IMG SRC=images/$image></A>"."<br>\n".
"Title: ".$row_Recordset1['title']."<br>\n".
"Format: ".$row_Recordset1['format']."<br>\n".
"Price: ".$row_Recordset1['make']."<br><br>\n\n";
}
$image = $row_Recordset1['image']
?>
<html>
<head>
i want the image to be displayed along with the other text information for each unique result in the loop. what am i doing wrong?
<?php require_once('Connections/connection.php'); ?>
<?php
mysql_select_db($database_db, $db);
$query_Recordset1 = "SELECT * FROM test";
$Recordset1 = mysql_query($query_Recordset1, $db) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_db, $db);
$genre = "comedy";
$query_Recordset1 = "SELECT * FROM test WHERE genre = '$genre'";
$Recordset1 = mysql_query($query_Recordset1, $db) or die(mysql_error());
while($row_Recordset1 = mysql_fetch_assoc($Recordset1))
{
echo "<A href=backs/$back><IMG SRC=images/$image></A>"."<br>\n".
"Title: ".$row_Recordset1['title']."<br>\n".
"Format: ".$row_Recordset1['format']."<br>\n".
"Price: ".$row_Recordset1['make']."<br><br>\n\n";
}
$image = $row_Recordset1['image']
?>
<html>
<head>
i want the image to be displayed along with the other text information for each unique result in the loop. what am i doing wrong?