PHP programming and MySQL database
PHP is an open source, server-side web-scripting language that is compatible with all the major web servers (most notably Apache) and databases.
By the help of PHP code you can create dynamic website content. Dynamic Web sites are flexible applications than merely sites.
If you know HTML, but you have no experience in the field of programming, you can easily learn PHP and MySQL with the help of this course.
This course starts from the most simple, explaining the operations of the PHP language, and then move on to detail how to create PHP programs, how to load the PHP scripts, and to the final approach more complex items, such as SQL commands, working with MySQL database, using classes and OOP (Object Oriented Programming) in PHP.
PHP Basic (beginner)
- Writing PHP scripts
- Writing PHP scripts, learn about PHP code structure, how to write and execute a simple PHP script and to add comments within your code.
- Variables and Data Types
- Learn about Variables, values and Data Types in PHP: boolean, integer, float, string, array, object, Resource, null.
- Numbers and mathematical 0perators
- Introducing Numbers and mathematical 0perators, some PHP functions for more complex operations with numbers.
- PHP Strings
- Working with strings, using simple and double quotes, escaping quotes and other characters, concatenating strings, some functions for strings.
- Introducing Constants, syntax for defining constants, differences between variables and defined constants.
- Superglobal $_SERVER Array
- Get information such as headers, paths, and script locations by using elements from Superglobal $_SERVER Array.
- PHP Error Handling and Debugging
- PHP MySQL course - Error Handling, debugging and trigger errors and how to adjust the level of error reporting, handling exceptions.
- If ... Else conditionals, Comparative and Logical operators
- Make PHP script takes decisions with If, Else, Elseif conditional statements. Compare two values with Comparative and Logical operators. The ternary operator.
- Using HTML Forms
- Using HTML Forms, PHP form handling, get data sent from form fields through GET and POST method, form validation.
- $_GET, $_POST and $_REQUEST Variables
- How to send data with get and post methods to a PHP script and access it with superglobal $_GET, $_POST and $_REQUEST variables.
- PHP Switch ... Case ...
- PHP MySQL course - Switch ... Case ... conditional statement, switch with break and default instructions.
- While Loops
- Using While and Do Wile Loops. End the While loops with the break instruction. Syntax and examples.
- For and Foreach Loops
- Using for() and foreach() Loops. End the "For" loops with the break instruction. Syntax and examples.
- PHP Arrays
- Creating Numeric (indexed) Arrays and Associative arrays. Accessing, modifying and traversing array elements.
- Multidimensional arrays and array functions
- Creating and working with multidimensional arrays, some array functions, traversing and sorting multidimensional array elements.
- PHP functions
- Creating and using your own functions with or without parameters, calling functions, the return statement, recursive functions.
- Functions, Variable scope and Passing by Reference
- Variable scope and Functions. Using GLOBAL and STATIC variables, passing variables by Reference.
- PHP Anonymous functions - Closures
- About Anonymous Functions, also known as Closures, how to create and use closures.
- Include and Require
- Insert the content of external files into a PHP file with Include and Require functions, include_once, require_once.
- File Handling with fopen
- File Handling with fopen(), create new file, write and read text file content with fopen(), fwrite(), fread() and fgets() functions. Moving the internal pointer, rewind() and fseek().
- File Upload
- This lesson shows how to upload files on the server, with PHP and an HTML form. Uploading files script.
- Exploring Folders
- Exploring the Folder system, creating folders with PHP, reading a directory content. Get information about a file path.
- PHP Cookies
- Setting and accesing cookies with PHP, retrieve a Cookie value, deleting cookies.
- PHP Sessions
- Setting and handling Session variables. Accessing and deleting session, destroy sessions. Store encrypted data in sessions.
- RegExp - Regular Expressions
- RegExp patterns - Regular Expressions. Examples with preg_match, preg_match_all, and preg_replace functions for string matching and string substituting operations.
- PHP Date and Time
- Date and Time functions, handle date and time information, UNIX timestamp, set and get time values.
- PHP DateTime and DateTimeZone classes
- Handle date and time information with PHP DateTime and DateTimeZone classes and objects, reset /change Timezone, get the difference between two dates.
- PHP Sending E-mails
- Sending E-mails, mail() function. Create a mail contact form script, validate e-mail address, filter input email data, and add the "From", "Conten-Type" (utf-8), and "Reply-To" headers in the email.
- PHP MySQL Introduction, Data Types
- PHP MySQL Introduction, database structure, tables. MySQL naming rules, and column's data types.
PHP - MySQLi
- PHP MySQL - using MySQLi
- Using MySQLi object-oriented (MySQL Improved) to connect to MySQL server. Perform SQL queries to create a database and tables.
- PHP MySQL - INSERT INTO
- Insert data in MySQL table with MySQLi object, INSERT INTO query. Get the auto ID from the last INSERT query with insert_id() method. Insert data from a form into a database.
- PHP MySQL - SELECT, ORDER BY
- Retrieve and display data from a MySQL table, SELECT SQL command. Determine the number of records to return with the LIMIT option. Sort query results with ORDER BY clause (ASC and DESC).
- PHP MySQL - WHERE and LIKE
- Selecting specific data from a database with the WHERE clause and Conditionals. Check for string matching with LIKE and NOT LIKE terms.
- PHP MySQL - UPDATE
- UPDATE query to edit / change existing records in MySQL table.
- PHP MySQL - DELETE
- The DELETE statement, used to entirely remove records from a database table.
- MySQL Aliases and Functions
- Using MySQL Aliases and functions, text, numeric / mathematical, and date and time functions.
PDO - MySQL
- PHP PDO - Introduction and Connecting to Databases
- Introduction to PHP PDO, Connecting to various databases, MySQL, PostgreSQL, SQLite, Firebird, MS-Access.
- PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL
- Using the exec() method to perform MySQL query, INSERT, UPDATE, DELETE.
- PHP PDO - Select query, fetch
- Select data in a MySQL table using the PDO query method, and FETCH constants.
- PHP PDO - prepare and execute
- How to use the prepare() and execute() methods to perform SQL queries, bindParam, and bindValue.
- PHP PDO - setAttribute, beginTransaction and commit
- setAttribute(), beginTransaction(), and commit(). Determine how to handle the errors, and execute multiple different SQL queries.
OOP - Classes and Objects
- PHP OOP - Creating Classes and Objects
- OOP (object-oriented programming), creating classes and objects. Setting properties and methods in a class, with public, private or protected attribute. Instantiate an object of a class.
- OOP - Constructor Method
- Creating classes with a Constructor Method, __construct(). Setting optional parameters in a constructor method.
- OOP - Accessor and Destructor methods
- How to use Accessor methods to set and get property values, defining Destructor methods. PHP functions for checking data type.
- OOP - Constants, Static Properties and Methods
- Defining and accessing class Constants, Static Properties and Static Methods.
- OOP - inheritance, class extends
- Inheritance, learn how to extend a class, create subclasses (child classes) that inherit all of the public and protected methods from a parent class. Overriding methods.
- OOP - Final Classes and Methods
- OOP - Final Classes and Methods, how to create a class that cannot be extended, and methods that cannot be overridden.
- Magic Methods __get, __set, __call, __toString
- About Magic (or interceptor) Methods and their utility in classes, __get, __set, __call, __toString.
- OOP - Abstract classes
- Creating Abstract classes and methods, extends an abstract class.
- PHP OOP - Interfaces
- Interface, a special class used like a template for classes, defines the methods required in a group of similar classes.
- Functions with Object and Array arguments
- How to set functions to accept only certain data type for its parameters, Object and Array arguments.
- PHP Method Chaining
- Learn how to chain public and static methods invocations in single instruction.
- getElementById and getElementsByTagName
- Learn how to get HTML elements from a HTML document using getElementById() and getElementsByTagName(), methods of the DOMDocument class.
- Working with HTML attributes in PHP
- Learn how to use the functions of the DOMElement class to read, set and remove attributes in HTML elements; getAttribute(), hasAttribute(), setAttribute(), and removeAttribute().
- XML Documents
- XML Documents, a brief introduction of initiation, the syntax and structure of an XML document. XML and DTD (Document Type Definition).
- PHP XML DOM
- Creating XML documents with PHP XML DOM (Document Object Model), DomDocument object, read and modify data in XML documents.
- PHP MySQL course - Using the SimpleXML functions to read and modify XML content.