Forum Moderators: coopster
i got this prob here. i'm trying to show my data but i cant. can someone help me out to see where's my mistake?
<form action="customers_view.php" method="get">
<?
$id = $_GET['id'];
$aCustomer = db_query(" SELECT * FROM customer_ms WHERE customer_code = '".$id."'");
if (!is_array($aCustomer) )
{
echo "<option value=''>no Customer details available</option>";
}
else
{
foreach ($aCustomer as $row)
{
?>
<tr valign="top">
<td colspan="2"><h5>Order</h5></td>
</tr>
<tr valign="top">
<td width="200" align="right"><h5>Receipt Number : </h5></td>
<td width="20"></td>
<td>
<?
$query="SELECT * FROM order_ms WHERE order_code='". $HTTP_POST_VARS['$id']."'";
$result=db_query($query);
if($result)
{
foreach ($result as $rowResult)
{
?>
<textarea name="receiptnumber" rows="8" cols="40" readonly="true" class="table-txt"> <? echo $rowResult['order_code'];?></textarea>
<input type="hidden" name="receiptnumber" value="<? echo $rowResult['order_code'];?>"><?
}
}
}
}
?>
</td>
</tr>
what i need to do is the receipt i hve to take it from other table in db.. thank you in advance!
If you are getting the order_code from the top query, you should put it as an input on this statement.
Hab