Hello!
It’s my first php file and I am sorry if question sounds stupid.
My form in email looks like:
Name of Company: text
etc.
However what i want the output to look like:
Name of Company: text
How can i acheive this?
Here is the small PHP form im using:
[php]<?php
$errors = ‘’;
$myemail = ‘[email protected]’;//
if(empty($_POST[‘uznemums’]) ||
empty($_POST[‘e_pasts’]) ||
empty($_POST[‘telefons’]))
{
$errors .= “\n Error: Nav aizpildîti visi lauciòi”;
}
$uznemums = $_POST[‘uznemums’];
$paterins = $_POST[‘paterins’];
$slegums = $_POST[‘slegums’];
$e_pasts = $_POST[‘e_pasts’];
$telefons = $_POST[‘telefons’];
$liguma_nr = $_POST[‘liguma_nr’];
$papildinformacija = $_POST[‘papildinformacija’];
$to = $myemail;
$email_subject = "Contact form submission: $uznemums";
$email_body = "Kontaktforma no www.fenzo.lv. ".
" dati:\n Name of Company: $uznemums \n Patçriòð mçnesî: $paterins \n Diferencçtais tarifs: \n $slegums \n E-pasts: $e_pasts \n Tâlrunis: $telefons \n Lîguma numurs: $liguma_nr \n Papildinformâcija: $papildinformacija ";
$headers = “From: $uznemums\n”;
$headers .= “Reply-To: $e_pasts”;
mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contact-form-thank-you.html');
?>
Contact form handler <?php echo nl2br($errors); ?> [/php]