php - HTML repopulate input text or textarea with original text -
i want have text-field (input type="text") or text-area in html takes users input. after "submit" clicked, php returns results. want repopulate text-field or text-area original user input. code works text-field, not text-area:
this works:
<input type = "text" name = "seqbox" size = 50 placeholder = "enter sequence here" value = "<?php if(isset($_get['seqbox'])) {echo $_get['seqbox'];} ?>">
this not work:
<textarea name = "seqbox" cols=100 rows=20 placeholder = "enter sequence here" value = "<?php if(isset($_get['seqbox'])) {echo $_get['seqbox'];} ?>"></textarea>
any idea why? thanks!
textarea doesn't have value property. need set in between element this:
<textarea name = "seqbox" cols=100 rows=20 placeholder = "enter sequence here"> <?php if(isset($_get['seqbox'])) {echo $_get['seqbox'];} ?> </textarea>
Comments
Post a Comment