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: 
$\_POST isn't working for you because you have the form method set to get.

```
<form name="mail_sub" method="post">

```

There's plenty of better info online as to the difference between post and get so I won't go into that but this will fix the issue for you.

Change your PHP as well.

```
if ( isset( $_POST['theirname'] ) ) {

    echo $_POST['theirname'];

}

```
Post is like "sending" the data to the page without giving the user having any interaction with it, when Get shows the parameters in the URL and making it public for the user. Get is more often used on "unsecure" type of datatransactions like for example a searchform and POST is used when you want to make more secure things like a login form. 

Using a Get will give you like
index.php?parameter=hello&parameter2=world

In your example you should use either POST in the method attribute in the formtag or $\_GET in the php section

So either 

```
<form name="mail_sub" method="post">
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['theirname']))
{

echo $_POST['theirname'];

}
?>

```

or

```
<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($_GET['theirname']))
{

echo $_GET['theirname'];

}
?>

```