Welcome to Commonlounge's PHP Class. This is a 23-part course which will teach you PHP from scratch. It's designed to be very hands-on and will walk you through every step of the process.
You don't need to have any previous knowledge of programming or PHP! The only prerequisite for this course is some basic knowledge of HTML.
The course is divided into five sections — set-up an...
The first few tutorials work on basic PHP concepts like strings, variables, arrays and if-statements — along with quizzes to check your understanding. Towards the end of the section, you will learn about more involved topics like functions, loops and superglobals — and also do a lot of coding exercises.
Welcome to the final part of this three part PHP Twitter Clone project! In this part, you will add the following features to the Twitter Clone: (a) follow or unfollow a user, (b) view the tweets of all the users that you follow and (c) use the search bar to search for a user. Let's begin!
We have to create a table to store which user is following which user.
What columns should the table have? What attributes should each column have?
Create the follow table using phpMyAdmin inside the twitter database.
Solution to this section can be found in section Solution: Follow table below.
Welcome to the second part of the three part PHP Twitter Clone project. In this part, you will add the following functionalities to the Twitter Clone: (a) user can post tweets, (b) the tweets will be displayed in the user feed, and (c) profile page for the users. Let's begin!
We have to create a table to store all the tweet information. Go ahead and create the tweets table in phpMyAdmin inside the twitter database.
What columns should the table have? What attributes should each column have? What should be the max-length for the tweet text?
Solution to this section can be found in section Solution: Tweets table below.
The wait is finally over! Welcome to your final project for the PHP course. In this three part project, you'll create a clone of Twitter from scratch using PHP and some basic HTML and CSS. Completing this project will require the use of all the skills that you have learnt in this course.
Here is an overview of what you will be creating in each of the three parts:
This quiz tests your understanding of PHP Data Objects (or PDO) and phpMyAdmin.
So far you have seen how PHP dynamically produces HTML (front-end). Now we will look at how PHP interacts with MySQL (back-end). You will learn how to connect to a database and execute data manipulation statements like INSERT, UPDATE and DELETE using PHP.
phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. It provides a user interface through which frequently used operations can be performed, while you still have the ability to directly execute any SQL statement. phpMyAdmin comes preinstalled with XAMPP.
When you installed XAMPP, you would have seen that the database that came along with it was called MariaDB and not MySQL. Both MariaDB and MySQL are very similar and can be used interchangeably. In fact, MariaDB is a fork of the MySQL open source project. This a...
This quiz tests your understanding of PHP object oriented programming concepts.
This quiz will test your knowledge about PHP sessions and form validation.
In this tutorial, you'll learn about Object Oriented Programming, or OOP for short. OOP allows you to create large projects while still keeping things easy to understand.
The world around is made of up different types of objects - planets, cars, computers, animals, and so on. In OOP, a type of object is represented by a class. Specific planets - such as Earth, Mars, Jupiter, etc and specific cars such as your car, my car, and the taxi driving by outside your house are each represented by an object.
In programming, a class is a programmer-defined data-type. A class contains some data, and methods / functions to use that data.
Let's look at how to define a class. First we have to define a PHP class, where the name of the class should be (preferabl...
Previously in the course, you learnt about forms in PHP: Superglobals and Forms. In this tutorial you are going to learn about (a) how to make sure your website remains safe and secure from hackers when you accept form input and (b) how to provide a user helpful messages when they fill a form incorrectly.
Let's quickly create a simple form in PHP:
<!-- form.php --><?phpif (isset($_POST['signup'])) {$username = $_POST['username'];$password = $_POST['password'];$email = $_POST['email'];}?><form method="post"><h3>Form</h3><input type="text" name="username" placeholder="Username"/>