A
A
Andreyweb302021-07-20 14:30:42
Web development
Andreyweb30, 2021-07-20 14:30:42

Saving data on the server, receiving data from the server, which is better to use?

Tell me how to do this correctly, what is better to use (ajax, jquery, databases, XMLHttpRequest)
1. From the form on the site, you need to send data to the server and save it there (in what format is better? JSON?)
index1.html
2. After get this data as a table in index2.html
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2021-07-20
@Andreyweb30

The data is stored in the DBMS. Tables/data collections need to be designed. You need to be able to work with the DBMS and build queries to it (usually in SQL). The application on the server receives data from the client, generates a write request, checks the execution result, generates a response, and returns it to the client.
On the other page, it receives query parameters, goes to the DBMS and receives data, then generates a response.

D
Dmitry Kuznetsov, 2021-07-20
@dima9595

Here you have 2 ways:
1. If you have all the logic of the frontend tied to JS, then send the data by request (axios, ajax, as it is more convenient).
2. If you have a site in a bunch of php/html, then it's better to send through the form to the php script.
Well, accordingly, depending on your "path" - get the data in the same way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question