You are here: Re: need help w/ outputting to a textarea « PHP SQL « IT news, forums, messages
Re: need help w/ outputting to a textarea

Posted by Jeff Brady on 10/13/02 11:46

NC wrote:
> Jeff Brady wrote:
>
>>My problem is with trying to print the data to a textarea
>>(on a form, so the data can be edited)
>
> ...
>
>><textarea name="LinkText" cols="100" rows="50" id="LinkText"
>> value="<? print $data[body]?>"></textarea>
>
> ...
>
>>any rules or weirdness I'm not aware of when printing field
>>contents to textareas?
>
>
> Yes. The text inside textarea should be output between <textarea> and
> </textarea>, not in the "value" attribute of the <textarea> tag.
>
> Change the line quoted above to this:
>
> <textarea name="LinkText" cols="100" rows="50"
> id="LinkText"><? print $data['body']; ?></textarea>
>
> Also note (although it is not related to the matter at hand) that
> indexes of associative arrays should be quoted (e.g., $data['body'],
> not $data[body]). The latter syntax works for now (when PHP encounters
> $data[body], it automatically defines a constant whose name and value
> are the same), but can become deprecated at any time without a warning.
>
>
> Cheers,
> NC

That was exactly it .. thanks! Apparently I forgot my basic HTML skills
somewhere along the way. =)

I also took your advice about the quotes. Thanks again!

Jeff

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация