RE: [PHP] Re: newbie:restricting users to change data in a textar ea

From: Date: Tue, 18 Mar 2003 10:42:48 +0000
Subject: RE: [PHP] Re: newbie:restricting users to change data in a textar ea
Groups: php.general 
Request: Send a blank email to php-general+get-140100@lists.php.net to get a copy of this message
Hi Coert, > > There is one field that I whant to stop them from changing > > You can put READONLY in your TEXTAREA tag While this would probably keep the honest people honest (assuming it's supported across all browsers), it won't stop anyone who wants to pollute the database. What's to stop me making my own version of your form, without READONLY, and submitting that? If the OP doesn't want users to change the data in the field, he/she should either display it so it's non-editable (i.e. in a <p>, or something), or simply ignore any changes users make to it. As a rule of thumb, *never* *ever* trust data that has left your server and then come back, regardless of whether it's in a readonly textarea, a hidden field, a cookie, whatever. Good programmers look both ways before crossing one-way streets. Cheers Jon

« previous php.general (#140100) next »