Question: I am coding a PHP script, but I can't really seem to get it to work. I am testing out the basics, but I don't really understand what GET and POST means, what's the difference? All the definitions I've seen on the web make not much sense to me, what I've coded so far (but since I don't understand POST and GET, I don't know how to get it to work:

```
    <form name="mail_sub" method="get">
Name: <input type="text" name="theirname"> <br />
Email:&nbsp; <input type="text" name="theirpass"> <br />
<input type="submit" value="Join!" style="width:200px">
</form>
<?php
if (isset($_POST['mail_sub']))
    {

    echo $_POST['theirname'];

    }
?>

```

Answer: 
To answer the question:

GET and POST are one of the many `request types` in the standards of internet.

The difference is that GET can't post data, parameters will be appended to the url (url-parameters) which has it's limitations. POST does post parameters/data.

The standard is:

* GET for getting data.
* POST for creating data.
* PUT for updating data.
* DELETE for removing data.
GET - If form method is GET then on submitting the form, Form will be submitted to

```
xyz.com/submit.php?theirname=john&theirpass=password   // CHECK HERE - form elements are in URL so not so secure

```

and can be checked by PHP
as 

```
if(isset($_GET['their']))
{
$name=$_GET['their'];  //name will return John
}

```

POST - If form method is POST then on submitting the form, Form will be submitted to

```
xyz.com/submit.php   // CHECK HERE form elements are not in URL

```

and can be checked by PHP
as 

```
if(isset($_POST['their']))
{
$name=$_POST['their'];  //name will return John
} 

```