Creating Database and Files in XAMPP

Section 1 – Creating Database and Tables

Step 1

Open phpmyadmin using the link http://localhost/phpmyadmin/ and click on Databases in the navigation bar. A list of databases is generated.

Step 2

Write the name of your database in the input area provided under the Create Database section. Let the other input remain Collation. On clicking the create button, the database is created and the name of the database also appears in the left sidebar.

Step 3

To create a new table, write the table name in the name input field in the Create Table section and the number of attributes in the Number of Columns input field. On clicking the Go button, the new table is created.

Step 4

Write the column names and their types and also specify the length, index and default value of the attribute if required. Click on the Save button when you are done.

You can see how the table structure is shown after it has been created.

Step 5

Click on you database name in the left sidebar to view all the tables in that database.

Section 2 – Creating Files in XAMPP

  1. All the files that are to be run on the local server are created inside the htdocs folder which is found inside the xampp folder.
  2. Linux users need to change the permissions of the folder because it is not in writable format.
  3. You can write your file directly in the htdocs folder or you can also write your files by creating folders inside htdocs folder.
  4. The following steps show how to create a simple HTML file that can be run on the local server.

Step1

Open the htdocs folder and create a new folder (If you want to store your file in a new folder)

Step 2

Create a HTML file and use some HTML tags and elements to check the functionality of the file.

Step 3

Open the link in the browser http://localhost/Your folder/yourfilename.html. If you save the file directly inside the htdocs folder, use the link http://localhost/yourfilename.html .

This content has been helpful to you?

Thanks for contributing!

Yes No