RE: [PHP-DB] textarea and mysql query
| From: | Shrock, Court | Date: | Mon, 18 Mar 2002 20:12:54 +0000 |
| Subject: | RE: [PHP-DB] textarea and mysql query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17745@lists.php.net to get a copy of this message | ||
You problem lies in the html that you are outputting.
For normal html <input> tags, you use the "value" attribute to initialize
the default display. For <textarea> tags, you do not use the "value"
attribute; instead, enclose what you want displayed between the openining
<textarea> tag and the closing </textarea> tag. For example:
<input type="text" value"Please edit this textbox">
<textarea>Please edit this textarea</textarea>
> -----Original Message-----
> From: jas [mailto:jlgerfen@hotmail.com]
> Sent: Sunday, March 17, 2002 10:54 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] textarea and mysql query
>
>
> I need some help with a query to place the results within a
> text area...
> here is the code and so far every time I try it out all that
> happens is it
> displays the textbox but not the results of the query.
> <form name="wel_area" method="post"
> action="index_confirm.php3 target="box">
> <?php
> $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh));
> echo "<textarea name='wel_area'
> value='{$record['wel_area']}'
> cols='25'
> rows='8'></textarea><br><input type='submit'
> name='save'
> value='save'><br>\n";
> ?>
> </form>
> Any help would be great.
> Jas
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>