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.

Who is Participating?
Without the whole error text, I can't tell for sure, but I'd guess the problem is really in one of those include files, classes/TellAFriend.php or classes/DatabaseHandler.php.
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.
scm0smlAuthor Commented:
I'm still putting it together so excuse the code.....

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

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

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));
scm0smlAuthor Commented:
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..........

scm0smlAuthor Commented:
there were spaces somewhere at the beginning or end of the include files..........
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.