Posts

simple-php-mysql-shopping-cart-tutorial
Home PHP

PHP Shopping Cart Tutorial – Step By Step Guide!

simple-php-mysql-shopping-cart-tutorial

Previously, we learned how to create, read, update and delete database records on our PHP OOP CRUD tutorial. Today, we will put that knowledge to work by building a simple PHP shopping cart application.

This is good news for you. If you do not want to use cookies or sessions for storing cart items, you can use your MySQL or MariaDB database.

Will there be any advantage if we use this approach?

Read more

php-shopping-cart-tutorial-using-cookies-1
Home PHP

PHP and MySQL Shopping Cart Tutorial – Using COOKIES To Store Cart Data

php-shopping-cart-tutorial-using-cookies-1
Previously, we have learned how to code a shopping cart using PHP SESSIONS. Today, we will learn a second way to do it. We will have a PHP shopping cart tutorial using COOKIES!

Sounds delicious, isn’t it? But the cookie that we will use is not the cookie we eat. Let me explain.

In this tutorial, we’ll use the HTTP cookie, also known as the web cookie or browser cookie.

It is usually a small piece of data stored in the user’s browser while the user is using the site.

It is designed to be a reliable way for websites to remember useful information, such as shopping cart items, or to record any user activity on a website.

Read more

shopping-cart-in-php-sessions
Home PHP

PHP and MySQL Shopping Cart Tutorial – Using SESSIONS To Store Cart Data

shopping-cart-in-php-sessions

Previously, we learned how to build a Shopping Cart with PHP & MySQL where we used a database to store cart items. Today, we will learn another version of it. We will use PHP session variables to store cart items.

Read more