PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Zeceer
Forum Contributor
Posts: 136 Joined: Fri Aug 02, 2002 5:10 am
Location: Norway
Post
by Zeceer » Sat Oct 05, 2002 4:39 pm
Hi,
I can't make this work for some reason.
Code: Select all
<?php
$to = "zeceer@hotmail.com";
$subject = "Order";
$headers = "zeceer@hotmail.com";
$body =
Navn: $_POSTї'navn'];
Post adresse: $_POSTї'postadresse'];
Postnummer: $_POSTї'postnummer'];
Sted: $_POSTї'sted'];
Telefon: $_POSTї'telefon'];
E-mail: $_POSTї'email'];
mail($to,$subject,$body,"From: $headers");
header( "Location: index.php" );
?>
I've tried a lot of methods, but doesn't get it right. Anyone?
hob_goblin
Forum Regular
Posts: 978 Joined: Sun Apr 28, 2002 9:53 pm
Contact:
Post
by hob_goblin » Sat Oct 05, 2002 5:08 pm
uh try
Code: Select all
$body = "
Navn: $_POSTї'navn']
Post adresse: $_POSTї'postadresse']
Postnummer: $_POSTї'postnummer']
Sted: $_POSTї'sted']
Telefon: $_POSTї'telefon']
E-mail: $_POSTї'email']";
Zeceer
Forum Contributor
Posts: 136 Joined: Fri Aug 02, 2002 5:10 am
Location: Norway
Post
by Zeceer » Sat Oct 05, 2002 6:12 pm
uh no
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
this is on line 9 which is the line with the first variable. The name variable.
mydimension
Moderator
Posts: 531 Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:
Post
by mydimension » Sat Oct 05, 2002 6:29 pm
the syntax got munged here i think:
Code: Select all
<?php
$to = "zeceer@hotmail.com";
$subject = "Order";
$headers = "zeceer@hotmail.com";
$body ="
Navn: $_POSTїnavn]
Post adresse: $_POSTїpostadresse]
Postnummer: $_POSTїpostnummer]
Sted: $_POSTїsted]
Telefon: $_POSTїtelefon]
E-mail: $_POSTїemail]";
mail($to,$subject,$body,"From: $headers");
header( "Location: index.php" );
?>
zebrax
Forum Newbie
Posts: 16 Joined: Sat Sep 14, 2002 11:39 pm
Post
by zebrax » Sat Oct 05, 2002 9:11 pm
Try
Code: Select all
<?php
$to = "zeceer@hotmail.com";
$subject = "Order";
$headers = "zeceer@hotmail.com";
$body ="
Navn: ".$_POSTїnavn]."
Post adresse: ".$_POSTїpostadresse]."
Postnummer: ".$_POSTїpostnummer]."
Sted: ".$_POSTїsted]."
Telefon: ".$_POSTїtelefon]."
E-mail: ".$_POSTїemail];
mail($to,$subject,$body,"From: $headers");
header( "Location: index.php" );
?>