PHP $_POST

Hi everyone, We use the predefined $_POST variable to collect values in a form with method=”post”. The information that is hold by POST method is hidden from user. Noone can see it like GET method in browser’s address bar. It has no limits…

Read More

PHP $_GET

Hi everyone, We use the predefined $_GET variable to collect values in a form with method=”get”. The information that is hold by get method is visible to everyone because we can see it in browser’s address bar. It has limits on…

Read More

PHP Forms

Hi everyone, We use $_GET and $_POST variables to retrieve information from forms, like user input. We are gonna talk about them later. But for now you should know this: Every form element in a HTML page is avaliable from…

Read More

PHP Functions

Hi everyone, Functions are very important in PHP. We write PHP scripts to make our page do something and actually the main purpose of functions is this. Do something, Get me something, Take this and give me this.. all these…

Read More

PHP Loops | foreach

Hi everyone, This loop type is used with arrays. It goes through the end of an array and runs the loop for each array value. The syntax is : Here is an example about foreach loop: output will be :…

Read More

PHP Loops | for

Hi everyone, The for loop is used when you know in advance how many times the script should run. The syntax is: init: We use this mostly to set a counter (but can be any code to be executed once at…

Read More

PHP Loops | do..while

Hi everyone, do..while loop is executed at least once and if the condition in the end is true the code-block inside loop is executed. Here is the syntax: Here goes an example: output will be : This is the first…

Read More

PHP Loops | while

Hi everyone, Loops are code-blocks that are to be executed specified number of times, or while a specified condition is true. We often want to execute some code blocks several times. To do this, in PHP we have four types…

Read More

PHP Arrays

Hi everyone, An array is a variable that can hold multiple values inside itself. For example: If we want to declare two fruit variables like below it is OK. What if we want to hold all of the fruits. At…

Read More

PHP Switch

Hi everyone, We use the switch statement to select one of many blocks of code to be executed. In switch statement an expression is compared with some values for each case in the structure. If there is a match, the related…

Read More