<form action="contact_send.php" method="post" name="form"> <input name="doel" type="radio" value="opnemen"> <input name="doel" type="radio" value="brochure"> <input name="doel" type="radio" value="afspraak1"> <input name="doel" type="radio" value="afspraak2"> <input name="bedrijfsnaam" class="textarea" type="text" size="35" maxlength="55"> <input name="contactpersoon" class="textarea" type="text" size="35" maxlength="55"> <input name="adres" class="textarea" type="text" size="35" maxlength="55"> <input name="postcode" class="textarea" type="text" size="7" maxlength="7"> <input name="plaats" class="textarea" type="text" size="35" maxlength="55"> <input name="telefoon" class="textarea" type="text" size="20" maxlength="23"> <input name="email" class="textarea" type="text" size="35" maxlength="40"> <textarea name="opmerking" class="textarea" cols="75" rows="8"></textarea> <input type="submit" class="buttons" value="Verstuur"> <input type="reset" class="buttons" value="Reset">
And here is the contact_send.php where the form in the HTML is responding to..
<?php
// Contact subject
$name = $_POST['name'];
$company = $_POST['company'];
$email = $_POST['email'];
$homepage = $_POST['homepage'];
$comment = $_POST['comment'];
$ip = $_SERVER['REMOTE_ADDR'];
$subject="CGFX-ContactForm";
$message="
E-Mail sent by: $name\n
E-Mail address of him/her: $email\n
Company: $company\n
Sender his/her IP: $ip\n
---------------------------------------------------------\n
His/Her Comment: $comment";
// Mail of sender
$mail_from="$email";
// From
$header="from: $name <$email>";
// Enter your email address
$to [email="="]='peters_niek@hotmail.com'[/email];
$send_contact=mail($to,$subject,$message,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
header('Location: sended.php');
}
else {
header('Location: errorform.php');
}
?>
When I fill in the form i get this error:
Parse error: parse error, unexpected T_VARIABLE in /home/httpd/vhosts/goemba.nl/httpdocs/contact_send.php on line 31
Line 31 is the line with: $send_contact=mail($to,$subject,$message,$header);
I really hope you guys can help me out!!
Edited by mexican0, 20 August 2007 - 06:16 AM.
