I am a newly developer looking for some help.
I have tried to search this issue, however i did not find anything satisfactory.

What i have got is basically:
Registration form. A user enters his details and registers for my website.
If the fields are too short a error is processed and redirected the same page with a variable in the url.
Then i get the url variable on same page and display the error.

However when i refresh the page the form information is gone, the error array works correctly and displays on page however i would have to pass the username,email etc.. in the url.

So my question is: would it be a problem to pass firstname,surname,username,email into the url so it can be displayed in the form after refreshing ? I know how to do this i was just wondering if it should be done or not.

**Edit**

An example of my code. But I would like to use this for username to hold the data after submission.

```
if (strlen($firstName) <= 3)
{
$error_array_4 = array("er4" => "t");
}

header('Location:'.$_SERVER['PHP_SELF'].'?'.$error_array_4.'');

if(isset($_GET['er4']) && $_GET['er4'] == "t")
{
echo "<div id='errorContainer'>Your firstname is too short</div>";
}

```