I am trying to have a user fill in a form, a page checks to see if the required fields are filled, then that page emails the information to us and displays a confirmation. We do not want a javascript checker right now. I have attached some of the code from the check/email page. The error I am recieving is: "Parse error: syntax error, unexpected '@' in ... : eval()'d code on line 1. $to = "email@address.com"; $subject = "subject line"; $message = "message with some of the variables being outputted too."; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= 'From: <another@email.com>' . "\r\n"; if(!$fullname || !$email) { echo ("You have not filled in all required fields"); exit; } else { echo('<fieldset style="width:600px" align="center"><legend>Confirmation</legend><br /> Thank You.</fieldset>'); eval("mail($to,$subject,$message,$headers);"); } Code (markup):
Is there a reason why you are using eval and not just mail()? From the code posted, there's no reason to use eval at all?
I dont know what I was thinking yesterday. I saw the same thing once I looked at the code this morning. Thanks for the help.