|
Posted by raj on 01/01/07 17:51
On Mon, 1 Jan 2007 16:49:52 +0000, OmegaJunior wrote
(in article <op.tlhidevg70mclq@cp139795-a.landg1.lb.home.nl>):
> On Mon, 01 Jan 2007 17:43:16 +0100, raj <raj@nospam.com> wrote:
>
>> Hi,
>>
>> I'm a newbie needing help to fix imported text in a textarea i.e so that
>> the
>> imported text in the text area cannot be changed in the webbrowser.
>> Here's
>> the code snippet:
>>
>> <p><textarea name="textarea2" cols="70" rows="7" wrap="virtual"><?php
>> include("contracts/termsandconditions.txt"); ?></textarea></p>
>>
>> Thank you in advance,
>>
>> Raj
>>
> Basically you're looking to disable the textarea element. Check out the
> "disabled" attribute in the html4 specification:
> http://www.w3.org/TR/html401/interact/forms.html#adef-disabled
>
> You'd use it like this:
> <textarea disabled="disabled" ...>
>
> But that's only the first step. Although the text can't be edited in the
> page, there's nothing preventing a malevolent visitor from editing it
> elsewhere and submitting the changed text to the form handler.
>
> Thus in your form handler you also must make sure not to include this
> textarea. If you need the text, include it in your form handler (a second
> time, since you already included it in the form) but don't read it from
> the textarea.
>
> Hope this helps!
>
>
>
Hi, thanks for the help, especially with the form handler bit.
You've definately helped.
Thank you.
Raj :)
[Back to original message]
|