Newletter Prgram code help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
abalone
Forum Newbie
Posts: 3
Joined: Wed Aug 30, 2006 11:45 am

Newletter Prgram code help

Post by abalone »

Hello I am brand new at this so go easy, I am trying to create a mailing list for my newsletter and I am using a book. I have entered all the code correctly but it is giving me this :

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/f/t/p/ftpcarrie/html/mail/class.SimpleMail.php on line 4

I have checked with my hosting company and they assure me that I have PHP 5 capabilities, and I tried to add this:

AddHandler application/x-httpd-php5 .php

to my .htaccess file then I get a message

POST is not allowed for the URL /mail/admin_transact.php. and my whole site just shows up in code

can somebody please help me or show me where to go to fix this. Much Appriecated!
abalone
Forum Newbie
Posts: 3
Joined: Wed Aug 30, 2006 11:45 am

figured

Post by abalone »

Ok I think I figured out one part of this, now im getting a new error, I changed the public/private to var,

Parse error: parse error, unexpected T_NEW in /home/content/f/t/p/ftpcarrie/html/mail/class.SimpleMail.php on line 78

here is the code:

}

if (!mail ($this->to,$this->subject,$this->message,$this->headers)) {
throw new Exception('Sending mail failed');
return FALSE;
} else {
return TRUE;
}
Post Reply