dad00 Posted February 18, 2009 Share Posted February 18, 2009 <?php $gamename = game name; $gamed = a game; $achievements = fun fun fun; $to = '[email protected]; $subject = 'New game'.$game_name; $message = 'You have a new game '.$game_name.' the description is '.$gamed. ' he wants these achievements '.$achievements; echo $message; mail($to, $subject, $message); ?> why dosent it work on localhost (no stmp so i know it wont send) i get this error: Parse error: parse error in C:\wamp\www\mail.php on line 2 While on 110mb i get this error: Parse error: syntax error, unexpected T_STRING in /www/110mb.com/d/a/d/0/0/_/_/_/dad00/htdocs/mail.php on line 4 http://dad00.110mb.com/mail.php Link to comment https://forums.phpfreaks.com/topic/145724-mail-code-isnt-working/ Share on other sites More sharing options...
killah Posted February 18, 2009 Share Posted February 18, 2009 $gamename = game name; $gamed = a game; $achievements = fun fun fun; Are oposed to be "string's". Change it to $gamename = "game name"; $gamed = "a game"; $achievements = "fun fun fun"; Link to comment https://forums.phpfreaks.com/topic/145724-mail-code-isnt-working/#findComment-765104 Share on other sites More sharing options...
Cal Posted February 18, 2009 Share Posted February 18, 2009 <?php $gamename = game name; $gamed = a game; $achievements = fun fun fun; These need to be enclosed in quotes to be strings. Like: <?php $gamename = "game name"; $gamed = "a game"; $achievements = "fun fun fun"; Link to comment https://forums.phpfreaks.com/topic/145724-mail-code-isnt-working/#findComment-765106 Share on other sites More sharing options...
cola Posted February 18, 2009 Share Posted February 18, 2009 Try this $gamename = "game name"; $gamed = "a game"; $achievements = "fun fun fun"; $to = "[email protected]"; Link to comment https://forums.phpfreaks.com/topic/145724-mail-code-isnt-working/#findComment-765108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.