Link to home
Start Free TrialLog in
Avatar of scm0sml
scm0sml

asked on

what does Parse error: parse error, unexpected T_CLASS mean?

what does Parse error: parse error, unexpected T_CLASS  mean?

I'm trying something thats a bit new to me.......

I'm sending an email......can any1 give me any hints as to what this may be relating too?

sorry its a bit vague....if u need more info just ask and i can explain a bit.

cheers
Avatar of snoyes_jw
snoyes_jw
Flag of United States of America image

typically, you're missing something on the line above, like a closing ) or a ; or something.  Post the 5 lines above the line reported in the error message, and the line itself.
Avatar of scm0sml
scm0sml

ASKER

I'm still putting it together so excuse the code.....

<?php include ("../includes/classes/TellAFriend.php");
include("../includes/literals.php");
include("../includes/classes/DatabaseHandler.php");
import_request_variables('p', 'p_');

      $friend = new TellAFriend();
      
      $friend->Name = $p_name1;
      $friend->Email = $p_email1;      
      
      $friend->SendEmail();      
      
?>

The function SendEmail consists of:
function SendEmail()
      {
            $mailTo = "$this->Email";
            $mailSubject = "UK Caravan Finder - Invites You.";                  
            $Header = "MIME-Version: 1.0\r\n";
            $Header .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $Header .= "From: registrar@ukcaravanfinder.co.uk";                        
            $output = "Your friend thought you'd be interested in the new craze if the caravn world!!<BR><BR>";            
            $output = nl2br($output);
            (mail($mailTo, $mailSubject, stripslashes($output), $Header));
      }
ASKER CERTIFIED SOLUTION
Avatar of snoyes_jw
snoyes_jw
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scm0sml

ASKER

the error message is:
Parse error: parse error, unexpected T_CLASS in /data01/ukcarfin/public_html/includes/classes/DatabaseHandler.php on line 2

but I use the DatabaseHandler class a lot and and have no probs with it so I dont think thats the prob..........

Avatar of scm0sml

ASKER

there were spaces somewhere at the beginning or end of the include files..........