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.
Hands-on Project: Twitter Clone - Follow / Unfollow and Search
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!
Step 1: Follow table
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.
Hands-on Project: Twitter Clone - Tweet, User Feed and Profile
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!
Step 1: Tweets table
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.
Hands-on Project: Twitter Clone - Login and Signup
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:
In the first part, you will learn how to structure your project. Then you will setup your database and create a login and signup page for your twitter clone website.
In the second part, you will create the user feed and the user profile page.
In the final part, you will add more features to the website such as follow / unfollow and search.
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...
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.
Class and Object
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.