I am working on a school project but I am having trouble with this block of code. Although I cant allow you guys to access my database, can you please try to find any syntax error or anything I am doing wrong. All I am getting is a blank space and any echoed text out of the loops.
<?php
$app= mysql_query("SELECT View FROM Stat");
echo "<table><tr>";
while($app_loop = mysql_fetch_array($app)){
$db_item = $app_loop['Item'];
$apps= mysql_query("SELECT * FROM Products WHERE Title='$db_item'");}
while($apps_loop = mysql_fetch_array($apps)){
$db_icon = $apps_loop['Icon'];
$db_title = $apps_loop['Title'];
echo"<td>
<form method='post' action='AppCatPage.php'>
<input type='image' src='$db_icon' width='50px' height='50px' id='sb'>
<input type='hidden' value='$db_title' name='apptitleu'>
</form>
</td>";
}
echo"</tr></table>";
?>
you selected only View column from table stat
but you are trying to read content of ‘Item’ Column
change first line to:
i think this is the problem …