populating forms from d/b?
Posted: Wed Apr 09, 2003 5:15 pm
Hi,
I'm doing a form to edit data from existing records in mysql d/b using
syntax:
<td> <input type=text name=author maxlength=30 size=30
value="<?php echo @$author ?>" ><br></td>
it all echoes properly except for a text area field using syntax:
<td><input type=textarea name=synopsis rows=4 cols=60
value="<?php echo @$synopsis ?>"></textarea> <br></td>
this shows blank on the form, but $synopsis does have the correct value.
does anyone know how to fix this?
also, I have another variable $genre, that I'd like to display in a select.
syntax is:
td><select name="genre">
<option value="Fiction">Fiction
<option value="Mystery">Mystery
<option value="Romance">Romance
<option value="SF/Fantasy">SF/Fantasy
<option value="War/Adventure">War/Adventure
<option value="Horror">Horror
<option value="Historical Fiction">Historical Fiction
<option value="Biography">Biography
<option value="True Crime">True Crime
<option value="Young Adult">Young Adult
<option value="Children">Children
<option value="Canadiana">Canadiana
</select><br></td>
When I try to echo $genre, it doesn't display.
Thanks in advance from a newbie:)
I'm doing a form to edit data from existing records in mysql d/b using
syntax:
<td> <input type=text name=author maxlength=30 size=30
value="<?php echo @$author ?>" ><br></td>
it all echoes properly except for a text area field using syntax:
<td><input type=textarea name=synopsis rows=4 cols=60
value="<?php echo @$synopsis ?>"></textarea> <br></td>
this shows blank on the form, but $synopsis does have the correct value.
does anyone know how to fix this?
also, I have another variable $genre, that I'd like to display in a select.
syntax is:
td><select name="genre">
<option value="Fiction">Fiction
<option value="Mystery">Mystery
<option value="Romance">Romance
<option value="SF/Fantasy">SF/Fantasy
<option value="War/Adventure">War/Adventure
<option value="Horror">Horror
<option value="Historical Fiction">Historical Fiction
<option value="Biography">Biography
<option value="True Crime">True Crime
<option value="Young Adult">Young Adult
<option value="Children">Children
<option value="Canadiana">Canadiana
</select><br></td>
When I try to echo $genre, it doesn't display.
Thanks in advance from a newbie:)