Code: Select all
<form><input type="text" name="readonly-field" readonly onfocus="this.blur()" /><input type="button" value="Add" onClick="N2.value = '<?php echo $_SESSION['username']; ?>', this.disabled=true" id="submitN2" /></form>
This:onClick="N2.value = '<?php echo $_SESSION['username']; ?>',
That function adds a value to a text field, The value is username, I don't have troubles with that, but I want that value (username) to never disappear because when I refresh page the value is not longer there, I'd like to change value permanently.
I'm making a form for a tournament so when someone logs on and click on add (<input type="button" value="Add") the form will register their name and will stay there untill I erase it, that's the main point of all this.