0

Hello,

I am trying to show an uneditable text through an input textbox.

The following input text box is still editable, how to make it uneditable?

<td>Page</td>             
                    <td><input type="text" size="50px" name="page" value="<?php echo $page; ?>"/></td>

Thanks before.

2
Contributors
1
Reply
13
Views
3 Years
Discussion Span
Last Post by cereal
0

Add the readonly attribute:

<input type="text" size="50px" name="page" value="<?php echo $page; ?>" readonly />

But remember that a client can always change the input, so if you do NOT expect changes, because for example you do not enable the editing through javascript, then you must ignore this field when you process the request.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.