Is it possible, without getting into the php file in which the name of the SQL table is selected, to change this name on the html page?

Those. in php file- SELECT FROM table1. It is necessary to change table1 to table2 remotely from the html page.

  • one
    Send the table name via GET / POST request not? - Vladimir Martyanov
  • "without climbing" is impossible. Telepathy for servers has not yet been invented - Ipatiev

1 answer 1

Of course, you can study data transfer through the request body (POST / PUT) or through request parameters (GET), how to work with this data can be found in the official PHP documentation . In essence, you create a form, send a field in it, and receive it on the server side in accordance with the method through which it was sent.

For security reasons, it is not recommended to transfer the name of the table to the query and allow it to be entered by the user. If the transfer of such data comes from the front-end, then most likely you are doing something wrong, the client side should not know anything about the internal structure and storage entities.