new2php09 Posted February 17, 2009 Share Posted February 17, 2009 Hi, Hope someone can point me in the right direction. I have just made a PHP form in flash. Called each of my boxes 1, Your_Name 2, Your_Phone 3, Your_email 4, Your_Message. I have then made this PHP code: ================================================================ <?php $your_name = $_GET['Name'] $your_phone = $_GET['Phone'] $your_email = $_GET['email'] $your_message = $_GET['Message'] $recipient_email = "[email protected]"; $subject = "from " . $your_email; $headers = "From: " . $your_name . " <" . $your_email . ">\n"; $headrers .= 'Content-type: text/html; charset=iso-8859-1'; $content - "<html><head><title>Contact letter</head><body><br>"; $content .= "Name: <b>" . $your_name . "</b><br>"; $content .= "Phone: <b>" . $your_phone . "</b><br>"; $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>"; $content .= $your_message; $content .= "<br></body></html>"; mail($recopient_email,$subject,$content,$headers); ?> <html> <style type="text/css"> <!-- .style1 { color: #FFFFFF; margin-top: 60px; font-size: 18px; font-family: Tahoma; font-weight: bold; } .style2 { color: #FFFFFF; font-size: 18px; font-family: "Comic Sans MS"; } .style3 { font-family: "Comic Sans MS"; font-size: 18px; } --> </style> <body bgcolor="#282E2C"> <div align="center" class="style1"> Your message has been sent. Thank you.</div> <p> </p> <div align="center"><a href="http://www.oopwee.com" class="style3">Back to oopwee</a> </div> <p align="center" class="style2"><a href="http://www.google.com">Google</a></p> </body> </html> <script>resizeTo(300, 300)</script> ================================================================== But I keep getting code error: Parse error: syntax error, unexpected T_VARIABLE in /home/content/o/o/p/oopwee/html/contact.php on line 5 If anyone could help that would be great.. thanks Link to comment https://forums.phpfreaks.com/topic/145652-1st-time-done-php-and-just-a-little-stuck-hahah/ Share on other sites More sharing options...
premiso Posted February 17, 2009 Share Posted February 17, 2009 $your_name = $_GET['Name']; $your_phone = $_GET['Phone']; $your_email = $_GET['email']; $your_message = $_GET['Message']; You were missing semi-colons after those statements. Also check the mail as you have "$recopient_emai" which should probably be "$recipient_email". EDIT: For further inquiries please use the tags around posted code. Thanks! Link to comment https://forums.phpfreaks.com/topic/145652-1st-time-done-php-and-just-a-little-stuck-hahah/#findComment-764657 Share on other sites More sharing options...
allworknoplay Posted February 17, 2009 Share Posted February 17, 2009 Duh, you don't have any semi colons in your variables you set... $your_name = $_GET['Name']; $your_phone = $_GET['Phone']; $your_email = $_GET['email']; $your_message = $_GET['Message']; Link to comment https://forums.phpfreaks.com/topic/145652-1st-time-done-php-and-just-a-little-stuck-hahah/#findComment-764659 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.