I found that a form with an input with DISABLED won´t send any variables like;
<INPUT TYPE=TEXT NAME=test VALUE='$value' DISABLED>
Any solutions?
Wouldn't that be the point of a 'disabled' field? Otherwise you should use 'hidden' fields.
I see the point of using a DISABLED-field to prevent the user from writing in it. A hidden field is invisible for the user. I have a login-system. When the password is out of date I would like to show the user a new form with two password fields for confirmation and one field for displaying the username. The username can´t be changed and will be there for informational purpose. A disabled field would be perfect for that if PHP had fetched thos variables.
do a disabled field AND a hidden field? or show the username simply as text in a td (with bgcolor)
regards finger
That would be my next move, just print the name as a text, not a form tag.
Anyway, it's not PHP that doesn't read the data, it's the browser that doesn't send the data.
another question: why is the user not allowed to change the username after he typed his pwd wrong? maybe he used the wrong user?
// for ie and netscape <input type=\"text\" value=\"not editable\" onfocus=\"this.blur();\" style=\"color: #CCCCCC;\">
// just ie <input type=\"text\" value=\"not editable\" readonly style=\"color: #CCCCCC;\">
The simplest solution:
use javascript to enable the textfield when the submit button is clicked.
<input type="submit" value="Submit" ONCLICK="javascript: document.(formname).test.disabled=false;">
this will enable the browser to send the data in the previously disabled textfield to php.
disabled is created specifically NOT to send values. If you don't want a user to change text field use <input type=text name=some_name value=some_value READONLY> READONLY supprtoed in a HTML 4.0 in older browser the textfield will be editable...