Jump to content

Parse error: parse error in C:\wamp\www\eigenofferte3.php on line 24


svenjcvd

Recommended Posts

Can somebody help me with my script please... My computer will get hurt...

;D Its driving me insane, i just can't figga out what the problem is.. I thinks its just a stupid little thing... hard to find..

 

This is my HTML and PHP :

O and its a fake email, so don't mail me..

Thank you...

 

<html>

<head>

<title>Offerte aanvragen</title>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

 

 

</head>

 

<Body>

<form action="eigenofferte3.php" method="post">

Naam + Voorletter(s): <input type="text" name="Naam"><br>

Adres: <input type="text" name="Adres"><br>

Postcode + Woonplaats: <input type="text" name="Poscodeplaats"><br>

Telefoonnummer: <input type="text" name="Tel"><BR>

Faxnummer: <input type="text" name="fax"><BR>

E-mailadres: <input type="text" name="email"> <BR>

 

Uw offerte aanvraag:

<textarea name="Offerteaanvraag"></textarea><br>

<input name="submit" type="submit">

</form>

</body>

</html>

 

 

</html>

 

 

PHP :

 

<?php

 

// your email address

$youremail = "[email protected]";

 

// field validation

if ($naam=="" || $tel=="" || $email=="" || $offerteaanvraag=="")

 

{

print ("De velden met een * zijn verplicht!");

}

 

else {

 

// email validation

if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) {

print ("Dit is geen geldig emailadres, probeer het opnieuw a.u.b.");

exit;

}

 

// send email

$headers = "From: \"$naam\" <$email>\n";

$subject = "Nieuwe offerte";

$message = "$naam", "$adres", "$postcodeplaats", "$tel", "$fax", "$email", "$offerteaanvraag", ";

 

mail ("[email protected]", "$Naam", $adres, $postcodeplaats);

print ("Bedankt $naam, Uw bericht is verzonden, we nemen zo spoedig mogelijk contact met je op!");

 

}

?>

i suspect its this line

$message = "$naam", "$adres", "$postcodeplaats", "$tel", "$fax", "$email", "$offerteaanvraag", ";

kind of strange looking. are you trying to concatenate that stuff together" of have a string with that stuff seperated by commas?

 

if first

$message = "$naam". "$adres". "$postcodeplaats". "$tel". "$fax". "$email". "$offerteaanvraag";

 

if second

$message = "$naam, $adres, $postcodeplaats, $tel, $fax, $email, $offerteaanvraag";

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.