Jump to content

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


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 = "svend@mail.com";

 

// 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 ("$svend@mail.com", "$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";

 

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.