Save data in websites built with HTML, CSS and JS
P粉536532781
P粉536532781 2023-09-06 18:08:22
0
1
471

I wrote a website using html, css, and js, but when customers register personal information, if localstorage is not used, where should this information be stored? In php language the data is saved in Mysql but in this case I don't know what to do.

P粉536532781
P粉536532781

reply all (1)
P粉530519234

A web application usually has client-side and server-side components.

To save data (without usinglocalStorage), this usually needs to be done on the server side. MySQL you mentioned is a server side technology, so is PHP. PHP cannot run in a browser; it can only generate client-side code (i.e. HTML, CSS, JS) that ultimately runs on the browser.

JavaScript, HTML, and CSS work together to create the client-side portion of the application. JavaScript is also available as a server-side technology, in the form of Node.js, but most people only use "JavaScript" for browser-based JavaScript.

(As a side note - there are services that can be used as server-side storage that you don't need to manage yourself, like Firebase. Even though it's not onyourserver, it's still server-side.)

Therefore, using "use html, css, js" is not limited to using PHP (or Python, Ruby, Node.js, or any other available server-side technology). When you want to store data, you usually need both.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!