Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2006, 11:50 AM
Registered User
 
Join Date: Aug 2006
Location: Vancouver, BC, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mailing List

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 the 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

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!

Reply With Quote
  #2 (permalink)  
Old August 30th, 2006, 12:27 PM
Registered User
 
Join Date: Aug 2006
Location: Vancouver, BC, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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;
        }

Reply With Quote
  #3 (permalink)  
Old September 2nd, 2006, 07:17 AM
Registered User
 
Join Date: Sep 2006
Location: Williamsburg, VA, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Carriemh,

Did you resolve this problem, yet?
I'm new to this, also, so don't expect a lot of help from me, but...

Judging from the error message you posted, it looks like your sending a pathname "...content/f/t/p/ftpcarrie...".
Shouldn't it be "...content/ftp/ftpcarrie..."?

If that's the case, it's probably a syntax problem. Perhaps you need to escape some characters somewhere in your script.

TG^2

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Mailing List ssomchai BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 May 5th, 2008 10:05 PM
Add Mailing List Problem USADarts BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 August 11th, 2004 10:19 PM
Mailing list module has error - HELP drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 8th, 2003 12:09 PM
Mailing List app has more errors - Help drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 7th, 2003 10:14 PM
mailing list using php dungey PHP How-To 1 June 4th, 2003 02:50 PM



All times are GMT -4. The time now is 09:55 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.