Series: Source Download: http://www.developphp.com/video/PHP/PayPal-IPN-PHP-Instant-Payment-No. ECommerce Website project is a web application which is developed in PHP platform. This PHP project with tutorial and guide for developing a code. ECommerce Website is a open source you can Download zip and edit as per you need. If you want more latest PHP projects here. PEEL Shopping is an eCommerce shopping cart application in PHP / MySQL which works on any hosting. It is using HTML 5 with the template engines Smarty (activated by default) or Twig, and is a state of the art solution, easy to maintain and make evolve, complete, simple and efficient. E-commerce menggunakan teknologi seperti Mobile Commerce, Transfer Dana Elektronik, Manajemen Stok, Internet Marketing, Proses Transaksi Online, Pertukaran Data Elektronik / Electronic Data Interchange (EDI), Manajemen Inventory, dan Manajemen Data System Otomatis. Aplikasi ini dibuat dengan PHP dan MySQL dan dengan gaya pemrograman sangat.

In this tutorial, I am going to teach you how to create a dynamic website from scratch using PHP 7 and Mysql. This article is a nice real-life example that can help beginner learners to understand the basics of PHP and MYSQL. It is written for educational purposes, however, it represents a good base that can be used to deliver a fully-operational digital product. Together, we shall create an example website with login and registration form. At the end of the article you will be able to connect PHP with MYSQL, create a website from scratch and add dynamic content to it. In order to get the most of this article, you need to have some basic knowledge of PHP. You also need a webserver (localhost or hosting account), where you can put the scripts. Last but not least, you need a code editor (Notepad ++ is enough for now). I tested the codes and I can confirm that they are working on my test web server.
1. Create a database
Before we can get things started, we need a database and a table, where users can register. Run the following query in MYSQL (you can use phpmyadmin):
Congratulations! You have created a database “db_1”. Now we need to create a table with columns for username, email, password and a date. Run the following in MYSQL:


Good job! We are done with the MYSQL part for now. Now it is time to connect PHP and MYSQL
2. Connect PHP and MYSQL
Create a db.php file and put it in the root directory of your webserver. (If you are running XAMPP on Windows, this is htdocs. If you run an Apache webserver on Ubuntu, you need to put the file in var/www/html).Paste the following code in your code editor:
db.php
Please make sure you put the correct username and password. Save the file as db.php. Now, in your web browser, go to http://localhost/db.php and make sure you have established connection with the database.Php Mysql E-commerce
3. Create Homepage
We need to create a home page. However, we might want to have a default page template, e.g. header and footer that are constant on all the pages. This can save as a lot of time, instead of having to code each page manually. For the purpose, create three new php files:Header.php, Footer.php and Index.php.
header.php
Great, we have created a header and we can now use it on all our php pages. I will show you how to do this in a minute. We have also added links to bootstrap css. Now let’s go on, create a footer:footer.php
Basically, what we did here is just adding some links to bootstrap and css, nothing to worry about. Let’s also add some custom css:style.css
Finally, let’s make a very simple homepage. We will change it later, but let’s keep it really simple for now.
index.php
Put all of the files in the root directory of your web server. That’s it! Now we have a homepage and we have included the header and the footer. You should be able to access it at http://localhost/. Now, we need to create the registration form.
4. Create Register page

Create a file called register.php and use the following code:
register.php
This php code is creating a line in the “user” table from the database db_1, whenever a new user fills in the registration form. Now, go to http://localhost/register.php to check if everything works.
5. Create Login page

Create a file called login.php and paste the following code:
login.php
The explanations are inside the above code, please read them carefully. What you need to understand is that php does a check with the database whether the submitted data exists in the user table that we have already created in MYSQL. If this is the case, the user can log in to the restricted area. This is the area for logged-in users, e.g. the dashboard.
6. Create Dashboard and Logout
Php Mysql Ecommerce Tutorial
You need to have a dashboard page for the registered users. You first need to have a file called auth.php to memorize the session. In this way, any non-authorised (not logged-in) users who try to access the dashboard or any other restricted area of your site, will be redirected to login.php. You should require auth.php for all the pages in your restricted area.
Ecommerce Website In Php
auth.php
