Author: Coding_Robort

PHP Lesson 12 – Common exercises

php exercises solution Here are three small exercises to deepen what you've just learned. First, we build a small password-protected page. Here's an example of how to check if form fields have been filled out by the user. Finally, it seems like several websites with only one PHP file can spend. Exercise 1: PHP Password protection For our [...]

Read More

PHP Lesson 11: Logical operators AND, OR, !, &&, || ()

php logical operators Often it is not enough to check only one condition in an if statement. For example, if you do a password query, you want to know if the username and password are correct. For this purpose, there are the logical operators. By means of any number of conditions can be checked. To check several conditions, the following keywords exist :   Both conditions [...]

Read More

PHP Lesson 10 – Comparison operators

Comparison operators Comparison operators in PHP allow you to compare values and variables. For example, they can be used to check whether a variable has a specific value, for example. operator Name explanation $a == $b Equal This comparison is true if $a and $b contain the same value. If the types of variables are different, they will be [...]

Read More

PHP Lesson 9 – Conditional if, if else statements

if elsestatement So far, PHP has not had much of an advantage over HTML. This will change now with the if statement. With if we can check whether certain conditions are met or not met. The skeleton for an if statement in PHP looks like this: <?php if(condition) { Statements } ?> The condition to be checked is placed in parentheses immediately after [...]

Read More