Hi, thanks for your time and knowledge. I am writing a script where a row is fetched. No problem up to there.
Now, I want to use that fetched info for some multiplying, but it always outputs zero. That code part is as follows:
<pre>
$result = mysql_query("SELECT gas_price FROM $table_name WHERE code LIKE '$gas' ");
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1 bgcolor='006666'>\n";
echo "<tr>
<td width='75'><font color='FFFFFF' size='2'><center><b>Price</b></center></font></td>
</tr>\n";
do {
printf("<tr>
<td><font color='FFFFFF'><center>$%s</center></td>
</tr>\n",
$myrow["gas_price"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>";
} else {
echo "No Info!";
}
{
$priceGas = "gas_price";
while ($due = ($priceGas * $gallons));
}
echo "<br>";
echo "<b>$ $due total </b>amount due";
echo "</td></tr>";
</pre>
Thanks again.
Regards