I'm a new developer with little experience in databases and I recently built my first website which was an appointment booking page for a service. However I am unfamiliar with how to store the clients data filled in the website form. Quickly did some research on databases and it got me creating a database in mysqlworkbench. I program on VScode, and now the issue is connecting this database from mysqlworkbench to my html file in vscode via php, however when I run the code the php doesn't run, thus the database is not connected to the html Would anyone know how to go about this?
Asked
Active
Viewed 211 times
0
-
To run php you need a proper webserver like apache or IIS. The basic one built into vs code is only suitable for simple static or javascript based pages, it cannot execute server-side code such as php. – ADyson Sep 27 '22 at 21:37
2 Answers
1
The database does not communicate directly with HTML, you need two things for your application to work, a back-end language (in your case, it would be PHP) and a local server so that this back-end language work. Another thing you need to take into consideration is the fact that you should work with the information that is inserted in HTML is Back-end, it would be responsible for all the logic of your application and for saving the data in the database
I agree that, in your case, the ideal would be to use XAMPP, for practicality and also to avoid configuration and installation errors.
But if you want to use XAMPP, I recommend that you look for a tutorial on how to activate error display as this can be disabled sometimes.

Tanuke Sensei
- 21
- 2