I have a form that is filled out once a year per customer, but some fields stay constant (birthday for example). So my goal is when a new customer fills out the form for the first time the birthday field is a text box, but after they fill out the form the first time and come back next year it just displays their birthday but does not allow them to edit it (echo's the birthday, not simply shows it in the text box).
What I have now is below, the goal of this statement is to check if there is a value in the SQL field, if so echo that value, else echo a text box. I keep getting an error when I try and load the form and I think its just a syntax error somewhere.
<?php
if($bday!="") //if bday field is not empty
{
echo $bday; //display bday field value
}
else
{
echo '<input type=text name=bday size=12 maxlength=12 value='<?php echo htmlentities ($bday, ENT_QUOTES) ?>'>'; //else echo the text box
}
?>