+ 1

Need help with databases

Hi everyone! My problem is that I don't understand, how to store user information on a web page. I know the HTML, CSS, JS and the basics of SQL. But I have no idea how to use the SQL within my page. In my opinion, it's a file stored within a folder, where html, css, js files are stored, and with javascript we access and edit the database file. Am I right?

17th Oct 2018, 3:08 PM
Roman Bive
Roman Bive - avatar
5 Respuestas
+ 4
You need a server for the database. It can be your own computer if you know how to set up, otherwise there are some conditional free servers on internet. For example, Burey's trending code utilizes a free chat server, so that players can walk around the map together and talk to each other real-time.
17th Oct 2018, 4:09 PM
Gordon
Gordon - avatar
+ 1
Roman Bive Thank you for marking my previous answer as best. It only makes me more responsible to make sure you get the points. So I am adding this to endorse my previous answer. First of all, in case you couldn't find the example I mentioned, it's this: Sololearn Battle Royale (Credit: Burey) https://code.sololearn.com/WrpYyc120xuK/?ref=app Pretty cool, isn't? (Remember to upvote the code) As you can see from the codes in HTML tab, in the game, he used a free online database called Firebase hosted by Google.
18th Oct 2018, 4:48 AM
Gordon
Gordon - avatar
+ 1
(continue one for word limit) Firebase https://firebase.google.com Here you see there are different usage, for example "Cloud Storage" are for Amazon-alike: You want your visitors to register and login each time and you store their user profiles (e.g. shopping records, nowsdays even browse records, etc.) on the database. For another example, Burey is using the real-time database. Regarding how to interact with the database server, you have to check the server's api, which are some methods for you to put data up / get data from. So it's not the same codes for different server.
18th Oct 2018, 4:50 AM
Gordon
Gordon - avatar
+ 1
(continue two for word limit) And I have a little suggestion for your sequence of development. If you, wrongly, coded your javascripts first and then go to check the server's api, your whole website may malfunction because your self-defined functions may overwrite the server's method if they are of the same name. So, remember, go through the server's api first, after you decide which database server you use.
18th Oct 2018, 4:50 AM
Gordon
Gordon - avatar
0
I guess, I should give it a try... Thanks for help
17th Oct 2018, 4:19 PM
Roman Bive
Roman Bive - avatar