Continuing on last week’s lesson, more PHP code was introduced. During this lecture, we have learned the use of PHP in forms, sending an e-mail through PHP, PHP functions, cookies, sessions and page redirection.
$_GET and $_POST
The $_GET and $_POST variables are used collect data from a form in an HTML document. The difference between the $_GET and $_POST is that when the $_GET is used, all variable values are visible in the URL while in the $_POST variables are not visible in the URL.
A cookie is a small file that the server embeds on the user’s computer used to identify a user. Each time the same computer requests a page with a browser, it will send the cookie too. To create a cookie the setcookie() function is used in the following format: setcookie(name, value, expire, path, domain); The $_cookie variable is used to retrieve a cookie value in PHP. It…
View original post 127 more words