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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.