Re: Textarea and PHP
| From: | Matt McClanahan | Date: | Sat, 29 Jul 2000 07:52:59 +0000 |
| Subject: | Re: Textarea and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8928@lists.php.net to get a copy of this message | ||
On Sat, 29 Jul 2000, Mark Lo wrote:
> Hi,
>
> I would like to display a message onto the textarea box loading from my database.
> i have tried the following code but the paragraph doesn't show up on my textarea box.
> Any ideas is welcome!!
> <?
> mysql_select_db("database");
> $query="select * from table";
> $result=mysql_query($query);
> $row=mysql_fetch_row($result);
> ?>
> <textarea row="5" cols="40" name="area" value="<?echo
> $row[0];?>"
> wrap="physical">
>
> When I look at the page sources code, I can see the paragraph is being loaded into the
> value="xxxx...xxxxx.xxxx.xxx" , but it just doesn't show up on the textarea box
> itself.
Because textarea is a very weird tag. Here's the trick:
<textarea name="name"><? echo $value ?></textarea>
Matt