S
S
slanec2018-03-23 17:26:31
PHP
slanec, 2018-03-23 17:26:31

How to encrypt the name of the test?

This is a design question and there is no implementation code.
I'm doing a project to create tests. Such a problem. It is necessary to display information about all tests that are available for editing or deleting. But there was such a problem. it is necessary, for example, to put information about the test in the a tag, something like this:

<a data-title="Название теста" data-id="1">Узнайте смысл жизни</a>
. But if I understand correctly, then you can edit the page code so that other values ​​\u200b\u200bare sent, maybe I'm wrong. Actually a problem: how to solve such problem and it is possible to implement any protection.
There was the following idea: to encrypt the name of the test in md5, and place it in a separate column in the table. When choosing, check the hash of the name of the selected and from the database, which corresponds to the data-id.
Please forgive me if the question is not clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ipokos, 2018-03-24
@ipokos

If you use the "test name" only to process the result received from the user, you need to use the identifier, not the name.
From the user you will receive only the answer and the id of the test to which he answered. Next, by id, select the desired test from the database and do what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question