Enough said
Nick
A few things came up after I submitted the first post.
Say you have code similar to: <input type="text" name="username" id="username" value="Nick" disabled="disabled" />
Then, the user submits the form and you go to access ‘username’ via $username = $_POST['username']
Well, you might be surprised to find out that disabled="disabled" actually disables the value of the variable $_POST['username'].
Instead, if you want to keep the value of the text input, you should use the following code: <input type="text" name="username" id="username" value="Nick" readonly="readonly" />
Now, when you go to access $_POST['username'], you should still have the value of the input.
Happy Coding!
Nick
Good afternoon!
I figured I would start posting some minor tutorials on how to do some of the less common things with [X]HTML.
As the title denotes, today’s tutorial is on disabling* access to a text box. The code is simple enough, and can be found below:
disabled="disabled"
And, using it within the context of a form:
<input type="textbox" name="name_of_choice" id="id_of_choice" disabled="disabled" />
And, there you have it. Your text box is disabled, and the user will not be able to change the value of the text box within the browser.
*For added security, do server-side form validation to make sure the value has not changed. Or, if you really want information to be unchanged, do not put the information within a text box, but rather print it to the screen.
Nick
Well, since I work for Purple Wave I figured I would make a post on the conference.
A live stream!
The stream has been deleted because the conference is now over.
Nick
While reading an article about airlines and the price of fuel, I came across this:
You are SO on target! I can hardly look at my 401K….someone should hang our Pres and VP. Each day I think maybe we have hit bottom (maybe I should join AA) and each day we sink deeper into the black hole. I feel like I am drownding…..
I mean, seriously. Love or hate the guy, how do you say that anyone should be hanged?
Nick