Hello everyone. New to the forums and been enjoying Dreamweaver CS5's powerful capabilities up until this point. I'm a little new to PHP, and having a little trouble. I will link the PHP syntax for you guys to take a look at. What I'm trying to make is a PHP file that sends an email for a refer a friend type form. This is line 16-34. Lines 25 and 29 are highlighted red. I'm a bit confused as to the errors given here, so any help would be greatly appreciated. I understand there's no email address in the $to string, I took it out for privacy's sake. Thanks in advance!
<?php $yourname = $_POST('yourname'); $youremail = $_POST('youremail'); $friendsname = $_POST('friendsname'); $friendsemail = $_POST('friendsemail'); $other = $_POST('other'); $to = ''; $subject = 'Refer a Friend from Whimsical Practicality' $msg = "$yourname recommended Whimsical Practicality to $friendsname.\n" . "Customer's email address: $youremail\n" . "Friend's email address: $friendsemail\n" . "Customer used this description: $other" mail($to, $subject, $msg, 'From:' . $yourname); echo 'Thanks for recommending us!<br />'; echo 'Your recommendation has been sent.<br />'; echo 'Please use the Back button to return to the previous page.<br />'; ?>
Europe, Middle East and Africa