Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

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
0
scm0sml
Asked:
scm0sml
  • 3
  • 2
1 Solution
 
snoyes_jwCommented:
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.
0
 
scm0smlAuthor Commented:
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));
      }
0
 
snoyes_jwCommented:
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.
0
 
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..........

0
 
scm0smlAuthor Commented:
there were spaces somewhere at the beginning or end of the include files..........
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now