Now We are moving to the next page that is registration please refer the section 7 for know the code.

I hope i can skip the first three lines of the registration page. It is already explained in previous articles. I’m moving towards the next line.

1
if(isset($_POST['submit'])){

GET, POST, REQUEST in PHP

There are number of superglobal variables in php

  • $GLOBALS
  • $_SERVER
  • $_GET
  • $_POST
  • $_FILES
  • $_COOKIE
  • $_SESSION
  • $_REQUEST
  • $_ENV

We are here only discussed about Three GET, POST and REQUEST. What is super global variables in php?. Which means that they are always accessible from any where with out considering the scope, and we can access them from any function, class or file without having to do anything special.

Both GET and POST are used to retrieve the information from a form,like user input in $_GET , input values are visible in the browser’s address bar but in case of $_POST it doesn’t. In $_GET variable has character length (Max. 100 character),$_POST have no length limit.We use $_GET when form method=”GET” and we use $_POST when method=”POST”.$_GET variable should not be used when sending password or some sensitive information.$_REQUEST contains the content of both $_GET ,$_POST and $_COOKIE. and it can be used to get the result from form data sent with both GET and POST method.

In line number 62 you can see this code

1
<form id="form1" name="form1" method="post" action="">

You can see that method = “Post”. That is we declare here we are using post method to pass the data.And all the values in the form available in the super global variable $_POST.

I’ll explain the remaining portion in the next article please follow the articles with care. and if you have any thing confusing please free to ask.

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 1