cnl83 Posted March 14, 2006 Share Posted March 14, 2006 Im getting a Parse error: parse error, unexpected $ in /home/apex/scormsource-www/classes/access_user/evaluation1submit.php on line 61Does anyone see anything wrong with this code? The variables are passed over through a form.[code]<?php $toAddress="chad@actionfx.net";$recipientSubject="EVALUATION 1 FOR CME";/* grabs the POST variables and puts them into variables that we can use */ $one=$_POST['one']; $two=$_POST['two']; $three=$_POST['three']; $four=$_POST['four']; $five=$_POST['five']; $six=$_POST['six']; $seven=$_POST['seven']; $eight=$_POST['eight']; $nine=$_POST['nine']; $ten=$_POST['ten']; $eleven=$_POST['eleven']; //---------VALIDATION--------> if($one){//----> CHECK input } else{ $error.="Please, go back and select a value<br>\n";//----> ERROR if no input } //GENERALLY YOU WOULD HAVE A LONG LIST OF THE ABOVE CODE, but EXCELLENT IS DEFAULT!//-------->ERROR FREE??//The below line has to echo, because php tries to parse the shit if($error==""){ echo "<script language=\"javascript\">document.location.href=\"authenticated.php\"</script>";//---------------------------------- $mailContent="--------CONTACT--------\n" ."Objectives: Stated learning objectives met.: ".$one."\n" ."Identify heart anatomy, muscle, chambers and vessels.: ".$two."\n" ."Describe heart physiology, including conduction pathways.: ".$three."\n" ."Differentiate waveform basics and their relationship to anatomy and physiology.: ".$four."\n" ."Demonstrate paper basics and heart rate determination.: ".$five."\n" ."Content : Relevant, valuable and adequate.: ".$six."\n" ."Presentation: Engaging, interactive, conducive to learning.: ".$seven."\n" ."Overall quality of this program.: ".$eight."\n" ."Practice: Validates, incorporates change in practice.: ".$nine."\n" ."Effectiveness: Met my personal objectives. : ".$ten."\n\n--------ADDRESS/INFO--------\n" ."Other Comments: ".$eleven."\n"; //The following is for a receipt //mail($email, $subject, $receiptMessage,"From:$toAddress"); //---------------------------------- mail($toAddress,$recipientSubject,$mailContent,"From:$toAddress"); //--->echo $mailContent; ?> [/code] Quote Link to comment Share on other sites More sharing options...
wickning1 Posted March 14, 2006 Share Posted March 14, 2006 if($error==""){No closing bracket on that. File you gave us has 50 lines, so it's tough to track down a bug on line 61. Quote Link to comment Share on other sites More sharing options...
cnl83 Posted March 14, 2006 Author Share Posted March 14, 2006 [!--quoteo(post=355001:date=Mar 14 2006, 07:02 PM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 14 2006, 07:02 PM) [snapback]355001[/snapback][/div][div class=\'quotemain\'][!--quotec--]if($error==""){No closing bracket on that. File you gave us has 50 lines, so it's tough to track down a bug on line 61.[/quote]Thanks! ti worked great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.