Click to See Complete Forum and Search --> : Is this code ok?


Perfidus
12-12-2003, 07:07 AM
I want PHP to write a radio button only if condition is ok, but I do not what I'm doing wrong because I´m getting an error:

<?
if ($row['ene1d']!=0)
{
echo"<input type='radio' name='ene1t' value='"
.$valor1=$row["ene1"]; $ene1t=$valor1+(($valor1*10)/100)+((($valor1*10)/100)*16/100); echo round($ene1t);.
"'>";
}
?>

pyro
12-12-2003, 07:31 AM
Do you computing outside the echo statment, and only echo the final value.

YoN
12-12-2003, 01:45 PM
Also, maybe it's a typo but it's is wrong anyways:echo round($ene1t);.
"'>";
You should change it to:>echo round($ene1t) . "'>";