video #38I - Advance PHP | SQL (Insert, Update, Delete)
We are continuing series of videos. In this video I talk about viewing all data by using the SQL select statement and the use of the prepare statement and object fetchAll.
4
views
video #20 - Advance PHP - $_SERVER - Part 2
This is part 2 of the $_SERVER superglobal. How to Get IP Address of a User in a share internet. Let me show you how to get a IP Address from a proxy server. A proxy server is a system or router that provides a gateway between you the user and the internet. This helps you prevent cyber attackers from entering a private network.
3
views
video #38I - Advance PHP | SQL (Insert, Update, Delete)
In this video we are continuing the #38 video. Here you will learn how to view all data from the table by using the select sql statement. Use the prepare statement because it is a secure way of reading a database.
4
views
video #38G - Advance PHP | SQL (Insert, Update, Delete)
The $_FILES is a superglobal variable is often used when uploading
files. $_FILES contains some information on the uploaded files, such
as file name, file size, file type etc.
We can use these information to save files.
2
views
video #38H - Advance PHP | SQL (Insert, Update, Delete)
I am still using the MySQL database. In this video, I am showing you the search technique. We are going to use SQL which stands for “Structured Query Language”. It is a domain-specific language used in programming and designed for managing data.
We will use INSERT, UPDATE, and DELETE commands to enable SQL users to manipulate and modify your data.
I check if the 'Search' button has been press. Then I create the select statement that I am going to use in the 'prepare' statement. I am also using the 'bindValue' with placeholder. Then I execute and fetch all data.
1
view
video #38G - Advance PHP | SQL (Insert, Update, Delete)
The $_FILES is a superglobal variable is often used when uploading files. $_FILES contains some information on the uploaded files, such as file name, file size, file type etc.
3
views
video #38F - Advance PHP | SQL (Insert, Update, Delete)
I am continuing the last PDO video. We will Insert, Update, and Delete a record from the database. I will be breaking this long video into several parts.
I am using the MySQL database which is an open-source relational database management system. We are going to use SQL which stands for “Structured Query Language”. It is a domain-specific language used in programming and designed for managing data.
We will use INSERT, UPDATE, and DELETE commands to enable SQL users to manipulate and modify your data.
3
views
video #38E - Advance PHP | SQL (Insert, Update, Delete)
On this video we are discussing the "preg_replace" function. We are using “preg_replace” to replace any script or styles sent through the form with a space. This protect against an injection attack. The “strip_tags()” function strips away any HTML, XML, and PHP tags. The “htmlentities()” function converts characters to HTML entities.
You cycles through an array using the “preg_match" function that gets rid of any “SQL” injection. The “preg_match" function matches a pattern and validate your form.
2
views
video #38B - Advance PHP | SQL (Insert, Update, Delete)
This is part 2 of video #38. I mention this on my last video that I was going to break it into several videos.
2
views
video #38C - Advance PHP | SQL (Insert, Update, Delete)
This is the 3rd video #38C. Remember on our last video we open the database and selected records to display as a table. I added several lines of global variable. I included a conditional statement to check for existing variable from the form.
The “array_key_exists” function checks an array for a specified key, and returns true if the key exists and false if the key does not exist. Form data goes into an associative array. We filter by sanitizing the input form data by checking if it is a string. I use this variable to check against a variable that I am creating holding a password.
1
view
video #38D - Advance PHP | SQL (Insert, Update, Delete)
This is the 4th video #38D. We will filters out the Input Post Data. The use of the sanitize filters.
The “FILTER_SANITIZE_STRING” filter strips tags and HTML-encode double and single quotes, optionally strip or encode special characters.
Encoding quotes can be disabled by setting.
The “FILTER_SANITIZE_INT” filter removes all characters except digits, plus and minus sign.
The “FILTER_SANITIZE_EMAIL” filter removes all characters except letters, digits and !#$%&'*+-=?^_`{|}~@.[].
Filter Flags:
FILTER_FLAG_NO_ENCODE_QUOTES - Do not encode quotes
FILTER_FLAG_STRIP_LOW - Remove characters with ASCII value < 32
FILTER_FLAG_STRIP_HIGH - Remove characters with ASCII value > 127
FILTER_FLAG_ENCODE_LOW - Encode characters with ASCII value < 32
FILTER_FLAG_ENCODE_HIGH - Encode characters with ASCII value > 127
FILTER_FLAG_ENCODE_AMP - Encode the "&" character to &
Now, The “filter_input()” function gets an external variable from form input and optionally filters it.
This function is used to validate variables from insecure sources, such as user input.
1
view
video #38 - Advance PHP | SQL (Insert, Update, Delete)
In this video I am continuing the last PDO video. We will Insert, Update, and Delete a record from the database. I will be breaking this long video into several parts.
I am using the MySQL database which is an open-source relational database management system.
We are going to use SQL which stands for “Structured Query Language”. It is a domain-specific language used in programming and designed for managing data.
We will use INSERT, UPDATE, and DELETE commands to enable SQL users to manipulate and modify your data.
The INSERT statement introduces new rows into an existing table. The UPDATE statement modifies existing records with new data. The DELETE statement deletes records from a database. Once, you delete you can't get it back unless you perform a backup of your database.
1
view
video #37 - Advance PHP | PDO (PHP Data Objects)
n this video I am going to show how to connect to your database and display all contents. We will connect to the database using the PDO (PHP Data Object). It is a lightweight, consistent framework for accessing your database.
5
views
1
comment
video #36 - Advance PHP | FULL INPUT FORM | FILE UPLOAD
In this video, I will show how to upload a file to your server. This is a PHP video and not HTML lesson, but I will show you a basic HTML with a form.
18
views
1
comment
video #35 - UPLOAD FILE
The function “move_uploaded_file()” moves your uploaded file from the “temp” sub-directory to a new location of your choosing.
8
views
1
comment
video #34 - EXPLODE | END | IN_ARRAY
We are going to talk about 3 commands. First, the “explode” command. The “explode” function splits your string into an array. The “in_array()” function check sif what’s in a variable matches what’s in an array. And then we will check what the array contains by using “print_r()”.
4
views
1
comment
video #33 - Advance PHP | PASSWORD ENCRYPTION
Learn about the PHP built-in function to help you encrypt your password. We are going to look at “hex2bin”, “bin2hex”, “ctype’ and ‘random_bytes'. The “bin2hex()” function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the “pack()” function.
3
views
video #32 - Advance PHP | MAIL
how to send mail using the PHP “mail()” function directly from a script. Use “wordwrap” function if my string lines are longer than 70 characters.
13
views
video #30 - Advance PHP | Super Global - GET, POST, FILES
The “$_GET” super global variable. This like the others are super global variables that are always available in all scopes. PHP “$_GET” is a PHP super global variable which is used to collect form data after submitting an HTML form with method=“get".
8
views
video #29 - Advance PHP | Namespace
The ‘Namespaces’ are qualifiers that solve two different problems. They allow for better organization by grouping classes that work together to perform a task. They allow the same name to be used for more than one classes.
8
views
video #31 - Advance PHP | PDO
PDO (PHP Data Objects) is a database access layer. It provides a fast and consistent interface for accessing and managing your databases. There’s another way to get to your database by using “MySQLi” it works for a procedural way of accessing your database.
8
views
video #27 - Advance PHP | Filesystem
I am going to be talking about the filesystem functions that will help with working with all files. We will be using 4 commands to open, read, get data and close a file. The filesystem functions allow you to access and manipulate the filesystem.
13
views
video #26 - Advance PHP | Foreach / Preg_match
The ‘foreach’ loop again. It is use to loops through a block of code for each element in an array. You use a regular expression to search for a pattern in your string or data from a form. A “preg_match” statement is a sequence of characters that forms your search pattern. You use a regular expression to do a case-insensitive search by adding the ‘i’ qualifier. It returns whether a match was found in a string. It will return ‘1’ if it found a match.
15
views
video #25 - Advance PHP | Return / Declare (Ticks - Encoding - Strict_Types)
The ‘return’ statement returns a value or NULL if you are not returning a value. The ‘return’ statement stops the execution of your current function. The ‘declare’ keyword that sets an execution a block of code to run. The ‘ticks’ directive will send a ‘tick event’ each time a specified number of instructions have been executed.
19
views