PHP for Beginners
Are you wanting to get into Web development, but are not sure where to start?
So maybe you tried out some PHP and MySQL tutorials on Youtube, but found them too hard or outdated, and feel that you need a more comprehensive introduction.
Maybe you want to learn how to write PHP the right way. Secure code, OOP ready, and maximising re-usability as well as finding out about PHP programming standards to adopt and adhere too?
Perhaps your boss or client threw you in the deep end with a PHP and MySQL project, and you need to get up to speed with PHP, fast.
Whatever the reason, this course is for you.
This course is going to teach you how to create web applications using PHP and MySQL. Specifically, you will learn PHP and then create you own content management system (CMS) from scratch.
PHP is the most popular website programming language in the world. The combination of PHP and MySQL is used extensively to create web applications, and developers with these key skills are in high demand. This course is going to teach you how to create web applications in PHP using the MySQL database.
What will you learn in this course?
You will learn how to create a dynamic website using the most popular website programming language in the world, PHP.
Dave Hollingworth, your instructor will teach you the PHP programming language, and take you through the steps to build a working CMS in PHP and MySQL from scratch.
Along the way, you will learn how to secure your code, how to write reusable, more maintainable code using programming standards, and how to structure your code using object-oriented programming techniques.
Dave will teach you the theory and then put the theory into practice when building the CMS.
You will also learn how to style your site using Bootstrap, how to integrate third-party code into your site, how to store data in a relational database and use this from PHP code, and more.
The course is very thorough, and goes through everything from installing a web server on your own computer, and editor to writing the code to create your web app. Towards the end of the course you will even learn how to upload the code and make your code live on the internet (very useful if you already have your own Hosting account). This is not necessary to complete the course though.
In summary, the course will teach you the core skills you need to know to become a productive PHP programmer.
Why this course?
Firstly, Dave has been creating web applications since 1999, when he created his first web application for a major insurance company. In addition he has been teaching IT for many years.
As a result, you will be learning the best practices from an experienced developer.
Dave will teach you the theory but then show how to put those techniques into practice. You will start building a CMS application from early on in the course and new techniques and theory are introduced as and when they’re needed to build the next part of the CMS.
New code is introduced one word or one line at a time, so you will never get bogged down or overwhelmed.
You will also learn real-world developer skills such as referring to and getting the most out of the documentation. This is an essential skill for developers to learn.
After completing this course, you will have the necessary skills to be able to create your own web applications with PHP and MySQL.
The sooner you sign up for this course, the sooner you will have the skills and knowledge you need to increase your job or consulting opportunities. PHP developers are in high demand!
Your new job or consulting opportunity awaits!
Why not get started today?
Click the Signup button to sign up for the course!
In this video we'll look at how to get the most out of the course, how to access the code shown in the lectures, and how to get help if necessary.
Software Installation and Setup
In this video we'll look at the recommended software you need to install on your computer to start learning PHP.
In this video we'll install the XAMPP web server, database server and PHP package on Microsoft Windows.
In this video we'll install the XAMPP web server, database server and PHP package on Mac OS X.
In this video we'll install the XAMPP web server, database server and PHP package on Ubuntu Linux.
In this video we'll install the open-source Atom code editor on Microsoft Windows.
In this video we'll install the open-source Atom code editor on Mac OS X.
In this video we'll install the open-source Atom code editor on Ubuntu Linux.
In this video you'll write your first PHP code to display a message in the web browser. We'll also look at how websites and PHP work, sending data to the browser.
In this video you'll learn what variables are, and how to create them in PHP. We'll also look at how to name variables, including best practices.
In this video you'll learn how to create variables containing different types, starting with strings and numbers, including integers and floating point values.
In this video you'll learn how to create variables containing boolean values (true and false) and the special null value.
In this video you'll learn how to perform operations on variables, such as mathematical operations like add, multiply and so on; and operations on strings like concatenation.
In this video you'll learn the difference between using single quotes and double quotes when creating a string variable. You'll also learn how to do variable interpolation, inserting a variable directly into a string.
Test your knowledge of basic PHP concepts, and variables and operators.
In this video you'll learn what arrays are, the two methods for creating an array variable in PHP and how to access individual array elements
In this video you'll learn how to assign manual array indexes to array elements, and how to use strings as array indexes to create associative arrays.
In this video you'll learn how to create multidimensional arrays, or arrays of arrays, and also how to access values inside them
In this video you'll learn your first control structure in PHP: the foreach loop, and how to use this to process each individual element of an array when you don't know how many elements are in the array.
In this video you'll learn how to use a foreach loop to access the index of each array element in addition to its value.
Test your knowledge of arrays in PHP.
In this video you'll learn how to run code based on a condition, using an if statement. You'll also learn how to run alternative code by extending the if statement using an else block.
In this video you'll learn how to compare one value to another using the various comparison operators that PHP provides, for example equals, not equal, less than, greater than or equal to and so on.
In this video you'll learn how to execute a block of code multiple times based on a condition, using a while loop control structure.
In this video you'll learn how to execute a block of code a specific number of times using a for loop.
In this video you'll learn how to add more conditions to an if else statement using elseif blocks with additional conditions.
In this video you'll learn how to use an alternative to many elseif statements: the switch statement. You'll learn how it's used to compare a variable or value to many different values and execute code based on that comparison.
Test your knowledge of control structures and comparison operators in PHP.
An Introduction to HTML
In this video you'll learn what HTML is, and how it's used to markup text to tell the browser how it's structured. You'll also learn the two types of HTML element, and how to add attributes to an HTML tag.
In this video you'll learn how to structure an HTML document using head and body sections, and how to add the title to the top of the browser window using the title element.
In this video you'll learn how to structure the content using header elements and paragraphs.
In this video you'll learn how to emphasise or give text importance using the em and strong elements
In this video you'll learn how to display lists of items in HTML, using ordered lists that have numbers, and unordered lists that have bullet points
In this video you'll learn how to insert images into an HTML document, including best practices for referencing the image
In this video you'll learn how to create a link from one page to another in an HTML document, using the anchor tag.
In this video you'll learn how to divide up your HTML code semantially using semantic sectioning elements like header, nav, main, article, section and so on.
Test your knowledge of the basics of HTML.
Mixing PHP and HTML
In this video you'll learn how to mix PHP and HTML to display dynamic content inside an HTML document. You'll also learn how to use the PHP opening and closing tags inside an HTML document, and the shortcut syntax for echoing out a value.
In this video you'll learn the best way to mix PHP control structures like if, foreach and so on with HTML, using an alternative syntax where necessary.
In this video you'll learn how to make your HTML documents easier to read by using whitespace characters (spaces, tabs, newlines and so on) and comments
A temporary addendum describing a change to the following video.
In this video you'll learn how to make your PHP code more maintainable and portable by using comments and coding standards, such as PSR-2
Test your knowledge of mixing PHP and HTML.
An Introduction to Databases
In this video you'll learn why we store data in a dynamic website in a database, and how this relates to the web server and PHP.
In this video you'll learn how to use the phpMyAdmin tool to connect to the database server and create a new database, ready to store data.
In this video you'll learn how structured data is stored inside a relational database, and you'll use phpMyAdmin to create a new table to store articles. You'll also learn best practices for naming tables inside a database.
In this video you'll learn how to access data in the database using structured query language, or SQL. You'll learn how to use the SELECT statement to select all or some columns, and how to use the WHERE clause to restrict the data returned based on one or more conditions.
In this video you'll learn how to use indexes to make queries faster when selecting data using the SELECT statement in SQL. You'll also learn how to return the results ordered by one or more columns using the ORDER BY clause.
In this video you'll learn how to connect to a database from a PHP script using MySQLi.
In this video you'll learn how to send an SQL query to the database from PHP and how to get the results back to display them.
In this video you'll combine PHP and HTML to retreive some data from the database using PHP, and display it in the browser using HTML to format it.
Test your knowledge of using databases with PHP.
Multiple Pages in PHP
In this video you'll learn how to add another page, this time to select and display one record from the database instead of several. You'll learn how to display a message if the record isn't found in the database.
In this video you'll learn how to pass data to a script in the URL using the query string, and how to access it in PHP using the $_GET superglobal.
In this video you'll learn what an SQL injection attack is, and how to avoid it for simple values in SQL
In this video you'll learn how to extract repeated code out into a separate file, and how to include that file in another script. You'll also learn the difference between include and require, and include_once and require_once.
In this video you'll learn how to use an .htaccess file to secure access to an included file
Test your knowledge of adding multiple pages to PHP; how to secure them and how to avoid database security issues.
An Introduction to HTML Forms
In this video you'll learn how to create a form in HTML so the user can submit data to a PHP script. You'll also learn how to retrieve that data in PHP.
In this video you'll learn what the two different form methods are, GET and POST, how to use them and what they are for.
In this video you'll learn how to create basic input types in a form: text, password, number and so on. You'll also learn what these look like in different browsers, and what happens when a browser doesn't support one of the more recent types introduced in HTML5.
In this video you'll learn how to access the data submitted from the form in PHP. You'll also learn how to submit a form using button elements, and how to name the form controls and access specific inputs in a script on the server.
In this video you'll learn how to create an input control that has multiple lines of text: the textarea element
In this video you'll learn how to use a select element to present a fixed list of options in a form, using option elements inside the select element
In this video you'll learn how to use inputs of type checkbox to present an option that can be toggled on or off. You'll also learn how the values from checkboxes are submitted, and the best way to use multiple checkboxes in a form.
In this video you'll learn how to use radio inputs to present a list of options where only one option can be selected at once, deselecting other options.
In this video you'll learn how to add a text caption to an input that is associated to that input, which is better for accessibility. You'll also learn how to check checkboxes and radio buttons by clicking the text next to that control using label elements.
In this video you'll learn how to make the form easier to use by grouping controls together in fieldsets, and how to use placeholder text to give the user a hint as to what to put inside a control.
In this video you'll learn about common form attributes and how they affect input controls: making them readonly, disabling them, and setting the focus automatically when the form is loaded.
In this video you'll learn how to validate the data in a form before it's submitted using HTML5 form validation attributes. You'll also learn how inputs of different types automatically validate the type of data entered into them depending on the type of the control.
Test your knowledge of HTML forms.
Inserting Data Into the Database from PHP
In this video you'll add a form to the code to insert a new article record into the database.
In this video you'll learn how to insert data into the database using the SQL INSERT INTO statement. You'll also learn how to insert multiple records at once in a single statement.
In this video we'll insert a new article record into the database using the form from earlier, and get the ID of the newly inserted record. The ID is assigned automatically by the database.
In this video you'll learn how SQL injection attacks work, and how they can be used to attack your site and potentially damage your database
In this video you'll learn how to avoid SQL injection attacks by escaping untrusted input from forms that might contain SQL code.
In this video you'll learn how to avoid SQL injection attacks by using prepared statements with placeholders for variables that are automatically escaped by the database server.
Test your knowledge of inserting data into the database.
An Introduction to Functions and Validation in PHP
In this video you'll learn how to create a function in PHP, including how to pass arguments, return values, and have default values for arguments.