Hello, I'm trying to pull data from multiple tables in a single mysql_query and I'm having trouble displaying the data that's pulled. Here's what I've got so far.. the highlighted code is the part that doesn't work.
(sorry in advanced for the sloppy code.. i've been copying/pasting stuff all over the place)
$getProducts = "SELECT t1.title, t2.amount, t1.id, t2.id FROM feelist t1, fees t2 WHERE t2.uid = '$user[id]'";
if (!$productResult = mysql_query($getProducts))
{
// There was an error in the sql statement
print "there was an error in the sql statement, ".mysql_error()."<br><b>$getProducts</b>";
exit;
}
else
{
?>
<form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post">
<br />
<div class="shadowDivider"> </div>
<?
while ($productRow = mysql_fetch_array($productResult)){
if ($user[account] == 1){
?>
<div class="formRow">
<label><? echo $productRow["t1.title"]; ?>:</label>
<input name="<? echo $productRow["t1.id"]; ?>" value="<? echo $productRow["t2.amount"]; ?>" />
</div><!--end formRow-->
<?
} //end if user is level 1
} //end while
} //end if-else