I'm trying to enable the input element of my web form for users with a certain id in php, currently here is the dynamic html content:
<input type="text" name="you" placeholder="only user with the following id can see this, sorry." disabled>
Here is the code that will activate for only the chosen user:
function chkboxClick(chkbox) {
chkbox.nextSibling.nextSibling.disabled = !chkbox.checked;
} // Checkbox appears asking user to check to enable input
I'm not specifically choosing a user, I'm trying to choose a random user. Basically there is a table in the database or some form of code which randomly selects a user and assigns the "YoureTheOne" id to that activating the above code. How do I create this table/code which randomly assigns the id to a user?