Required programs
First you must download and install the following programs from the internet:
- XAMPP - modules: Apache, PHP, MySQL, phpMyAdmin, Fake Sendmail (only if sending emails)
- Visual Studio Code - PHP extension recommended
- Chrome - any browser is fine but Internet Explorer may display styles incorrectly
This tutorial will use examples based on developing using Visual Studio Code on Windows, but most parts will apply to other IDE and OSes.
Creating project folder
- Open Visual Studio Code.
- Click Open folder... or File > Open folder...
- Find your XAMPP installation and enter the htdocs folder.
- Create a new folder called NeatTreats.
- Click New File in the Explorer tab (left) or File > New File. Save the file as
index.php
which means it is the landing page (links to other pages).
Opening your site
- Open File Explorer to your XAMPP installation folder.
- Run xampp-control.exe and start the Apache and MySQL module.
- Open your browser to URL
localhost/NeatTreats
(if your project folder NeatTreats is in the htdocs folder). - Make sure you have an index.php file inside NeatTreats and it will be displayed!
- When you make changes to the code, refresh the browser using F5 to see what changed.
Entering SQL commands
- Open File Explorer to your XAMPP installation folder.
- Run xampp-control.exe and start the Apache and MySQL modules.
- Open your browser to URL localhost/phpmyadmin.
- Enter commands into the console at the bottom. It is good practice to learn the commands rather than use the GUI tables.
Top comments (0)