Page 1 of 1

If Elseif Else Help

Posted: Thu Apr 29, 2010 10:19 pm
by maxline
What am I doing wrong with this if elseif else statement? I am needing 1 of 3 things to happen
either give an input box if the default value of 0.00 is in place, echo a value previously entered value if not = to "Unused" or just keep the value as "Unused" if it already is such.

Code: Select all

<?php
$secret = Unused; $holder = 0.00;
if ($holder == $amount1) { ?>
<td>$&nbsp; <input type="text"name="amount1" value="" maxlength="12" onkeypress="return noenter()"</td>
<?php }elseif ($date1 != $secret)
{
echo '<td align="center">$' .$amount1. '</td>'; 
}else{ 
} ?>  
<input type="hidden"name="amount1" value="Unused" maxlength="12" onkeypress="return noenter()">


Re: If Elseif Else Help

Posted: Fri Apr 30, 2010 12:36 am
by Christopher
You have the last input outside the else. What part is not working?