Jump to content


Photo

Parse error unexpected $


  • Please log in to reply
2 replies to this topic

#1 cnl83

cnl83
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 14 March 2006 - 06:51 PM

Im getting a
Parse error: parse error, unexpected $ in /home/apex/scormsource-www/classes/access_user/evaluation1submit.php on line 61

Does anyone see anything wrong with this code? The variables are passed over through a form.

<?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; 

?> 


#2 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 14 March 2006 - 07:02 PM

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.

#3 cnl83

cnl83
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 14 March 2006 - 07:04 PM

[!--quoteo(post=355001:date=Mar 14 2006, 07:02 PM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 14 2006, 07:02 PM) View Post[/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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users