I'm having a hard time creating logic and / or code.
I have a landing page that I need in a simple way, preferably without using a database, run a script once and sometimes not.
For example:
- User 1 registers: executeScript ()
- User 2 signs up: does not run script
- User 3 subscribes: executaScript ()
- User 4 signs up: does not run the script
- User 5 subscribes: executaScript ()
- User 6 signs up: does not run script
- User 7 subscribes: executaScript ()
- User 8 signs up: does not run the script
...
I even believe it can be done by using a simple database to control with true or false, but I'm running into logic for some time. Can anyone help?
It can be done in PHP or Vanilla JavaScript.