as the title said
i would like to create a button that says “available” and once any one clicks it it turns to “unavailable” for all future users
any ideas ?
note : its for a school project, nothing fancy or even secured, just trying to prove a point
sorry for being vague for some, all i am trying to do is to create an article in my joomla website with a button that only the fastest user can access and click, thats it
i am not worried with security or even cheating attempts
joomla articles can have php js codes among others added to them
Simplest way without using a database, here’s the basic logic using a simple text (or you could use YAML, ini, xml etc.) file with either 1 (clicked) or 0 (not clicked) in it:
You’ll need to do some validation checks i.e. the file is readable, you can update the file etc. but that’s pretty much all you’d need to do if you don’t want to use a db.
Also, be sure to put that file below the web directory so a user can’t browse to it.
EDIT: But if you’re using Joomla, just use the db to do it. This way is ugly.