Jump to content

Recommended Posts

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.

[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]
Link to comment
https://forums.phpfreaks.com/topic/4960-parse-error-unexpected/
Share on other sites

[!--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!
Link to comment
https://forums.phpfreaks.com/topic/4960-parse-error-unexpected/#findComment-17476
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.