I want to add a link to php document that goes back to previous page
<p>I am making an email me form using PHP and when you don't fill required fields you are sent to another page with errors that you need to correct.</p>

<p>At the bottom of these errors I want to make return link, but I can't figure out what I am doing wrong, because Dreamweaver shows me an error at the line I wrote. So here is the code and I will mark the line with comment.</p>

<pre><code>&lt;?php
if(isset($_POST['email'])) {

$email_to = "example@example.com";
$email_subject = "website html form submissions";

function died($error) {
    echo "Atsiprašome, bet yra klaidų Jūsų užpildytoje formoje.&lt;br /&gt;&lt;br /&gt; ";
    echo $error."&lt;br /&gt;&lt;br /&gt;";
    echo "Grįžkite ir ištaisykite klaidas.&lt;br /&gt;&lt;br /&gt;";
    echo "&lt;a href="contacts.html"&gt;Atgal&lt;/a&gt;";  //this is the line
    die();
}



if(!isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) {
    died('Atsiprašome, bet yra klaidų Jūsų užpildytoje formoje.');       
}

$first_name = $_POST['first_name']; // required
$last_name = $_POST['last_name'];   // required
$email_from = $_POST['email'];      // required
$telephone = $_POST['telephone'];   // not required
$comments = $_POST['comments'];     // required

$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
    $error_message .= 'Neteisingai įvestas el. paštas.&lt;br /&gt;';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
    $error_message .= 'Neteisingai įvestas vardas.&lt;br /&gt;';
}
if(!preg_match($string_exp,$last_name)) {
    $error_message .= 'Neteisingai įvesta pavardė.&lt;br /&gt;';
}
if(strlen($comments) &lt; 2) {
    $error_message .= 'Neteisingai įvesta žinutė.&lt;br /&gt;';
}
if(strlen($error_message) &gt; 0) {
    died($error_message);
}
$email_message = "Form details below.\n\n";

function clean_string($string) {
    $bad = array("content-type","bcc:","to:","cc:","href");
    return str_replace($bad,"",$string);
}

$email_message .= "First Name: ".clean_string($first_name)."\n";
$email_message .= "Last Name: ".clean_string($last_name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Telephone: ".clean_string($telephone)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";


$headers = 'From: '.$email_from."\r\n".'Reply-To: '.$email_from."\r\n" .'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
?&gt;

&lt;!-- place your own success html below --&gt;

Ačiū už Jūsų žinutę.

&lt;?php
}
die();
?&gt;
</code></pre>
