A
A
avdoshka2020-07-08 12:08:47
MySQL
avdoshka, 2020-07-08 12:08:47

How to create an Action Sequence in a database?

Help me understand how to make it so that when you enter the correct key, the first picture disappears and three pictures appear, how can this be done? The logic is such that the user enters the correct key and the picture disappears in its place, several pictures appear.
5f058cfa39874235076690.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2020-07-09
@rPman

It is not necessary to do everything in mysql, so if I say base, this means it can be, incl. for example local session variables of the web server.
The database is a snapshot of the current state, but it is not responsible for actions and reactions, it only stores data. You need a backend - a server part that will stand between the user's browser and the database (in principle, there is no direct access to the database from the browser, although there are terrible examples when they tried to do this).
Your entities should have variables containing the current state - i.e. the person just entered the site, entered the correct code, entered the wrong code, etc. when you draw business logic on a piece of paper / in special programs, you can immediately see it.
Identify a person with a session, the concept of a session is in all frameworks for a web server, for example php - see session_start()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question