Is it possible to diable a textbox so the user can't edit the value or copy it? I want to be able to display the data in the text box (from the database) but not allow the user to edit it. How can I do this? 
Is it possible to diable a textbox so the user can't edit the value or copy it? I want to be able to display the data in the text box (from the database) but not allow the user to edit it. How can I do this? 
Busy posted this at 10:23—30th July 2007.
He has: 6,148 posts
Joined: May 2001
place this in the tag
readonly="readonly"
like so:
<?phpecho stripslashes($description);
?>
<?bhb if(broken){ echo("It wasn't me
"); } ?>
Learn HTML the ez way - EzHTML.net
Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...
drew22299 posted this at 11:04—30th July 2007.
He has: 107 posts
Joined: Mar 2006
Thanks, can the stripslashes be used in asp? I have fields the user enters data into and sometimes if they put too many //// it gives an SQL error, how can I make these inputboxs SQL injection proof etc? is the stripslashes a way of doing this?
Is there a way to do this without javascript? like using a label?
www.hotlista.co.uk
Busy posted this at 20:51—30th July 2007.
He has: 6,148 posts
Joined: May 2001
Sorry I do not know asp
stripslashes is from the database, addslashes would be to enter into database, but thats php
a label just labels the field, readonly isn't javascript, other option is just plain ole text
<?bhb if(broken){ echo("It wasn't me
"); } ?>
Learn HTML the ez way - EzHTML.net
Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...
mscreashuns posted this at 23:32—30th July 2007.
He has: 529 posts
Joined: Jul 2005
You could also use:
... disabled="disabled" ...'
instead of the readonly option, although I've never understood the difference.