Send e-mail with page name in it
<p>I currently have a contact form, from which e-mails are composed and sent using php. I use a separate php file for that. </p>

<pre><code>$errors = '';
$myemail = 'mail@gmail.com';//
if(empty($_POST['name'])  || 
   empty($_POST['email']) || 
   empty($_POST['phone']))
{
    $errors .= "\n Будь ласка, заповніть усі поля";
}

$name = $_POST['name']; 
$email_address = $_POST['email']; 
$message = $_POST['phone']; 
$page = getRequestURI();

if (!preg_match(
"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", 
$email_address))
{
    $errors .= "Некоректна адреса e-mail";
}

if( empty($errors))
{
    $to = $myemail; 
    $email_subject = "Contact form submission: $name";
    $email_body = "Нове замовлення туру: $page".
    "Деталі:\n Ім'я: $name \n Email: $email_address \n Телефон \n $message"; 

    $headers = "From: $myemail\n"; 
    $headers .= "Reply-To: $email_address";

    mail($to,$email_subject,$email_body,$headers);
    //redirect to the 'thank you' page
    header('Location: contact-form-thank-you.html');
}
</code></pre>

<p>I need to put such forms on different pages. And there should be information about the page on which form was submitted in the message sent by e-mail. </p>

<p>Is there a possibility to do that without creating separate php files for every page? 
In other words how can I get the name (or url) of the page, on which form was submitted?</p>