There are some answers on stackovervlow but not one that solves my problem, I have tried to find it but I just can’t find it.
This is the code, it must be something simple I guess.
?><input type='submit' <?php echo "name= ".$Buttons[$Teller].""; ?> value='Schrijf in!'><br/><?php
After Pressing it some info sent to the database.
But I want the Schrijf in! value changed to Schrijf uit!
I really can’t find it, nor here or in Google 🙂
You’ll have to make a database call each time you load that page, to check if the button should say ‘Schrijf in’ or ‘Schrijf uit’. Perhaps test if the logged in user is already in the database table or something of that sort. Then set the button value based on that conditional.
Alternatively, you could create a
$_SESSIONvariable to keep track of whether or not the user has clicked the button already..