Weborum Webmaster Forum > Getting Parse Error
Help - Search - Members - Calendar
Full Version: Getting Parse Error
Weborum Webmaster Forum > TUTORIAL ARCHIVE - tutorials & scripts to save you scouring the internet. Please feel free to add your own. > PHP Tutorials & scripts
P.T.
"Parse error: parse error in" following the path to my php file. It's giving the line that I have added the exta email address to. Can anyone help a noob with this? What do I do to fix it? Thanks for all advice.
Joe
what exactly does the error say?

and what did you change? need to see some code wink.gif

not an expert but i will try to help as much as i can
P.T.
Parse error: parse error in" following the path to my php file on line 50. Line 50 is the line with the two email addresses on it. That's what the error says except the following is all of the info to my file. I have been doing some experimenting and if I remove the extra email address from the php file the form works as it should. If I put the extra email address in, I get the parse error. So, that being said I think my php file needs to be changed somewhere, but I don't know enough about php to make the changes. I got this off of one of those fill in the blank sites that will pop-up out a php file. Pretty neat until go to changing it. LOL

I really appreciate all the help I've gotten here today and I am sorry about worrying you guys to death. Here's the code. (email addresses and web pages have been changed for privacy reasons)

<?
/*
CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.01.
Generated by thesitewizard.com's Feedback Form Wizard.
Copyright 2000-2003 by Christopher Heng. All rights reserved.
thesitewizard and thefreecountry are trademarks of Christopher Heng.

$Id: phpscript.txt 1.1 2003/04/17 11:53:45 chris Exp $

Get the latest version, free, from:
http://www.thesitewizard.com/wizards/feedb...dbackform.shtml

You can contact me at:
http://www.thesitewizard.com/feedback.php

LICENCE TERMS

1. You may use this script on your website, with or
without modifications, free of charge.

2. You may NOT distribute or republish this script,
whether modified or not. The script is meant for your
personal use on your website, and can only be
distributed by the author, Christopher Heng.

3. THE SCRIPT AND ITS DOCUMENTATION ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
IMPLIED WARRANTY OF MECHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. YOU AGREE TO BEAR ALL RISKS AND
LIABILITIES ARISING FROM THE USE OF THE SCRIPT,
ITS DOCUMENTATION AND THE INFORMATION PROVIDED BY THE
SCRIPTS AND THE DOCUMENTATION.

If you cannot agree to any of the above conditions, you
may not use the script.

Although it is NOT required, I would be most grateful
if you could also link to thesitewizard.com at:

http://www.thesitewizard.com/

*/

// ------------- CONFIGURABLE SECTION ------------------------

// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;

$mailto = 'me@hotmail.com' 'someone@hotmail.com' ;

// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;

$subject = "Feedback Form" ;

// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;

$formurl = "http://www.example.com/feedback.html" ;
$errorurl = "http://www.example.com/error.html" ;
$thankyouurl = "http://www.example.com/thanku.html" ;

// -------------------- END OF CONFIGURABLE SECTION ---------------

$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}

$messageproper =

"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;

?>
Timo
$mailto = 'me@hotmail.com' 'someone@hotmail.com' ;

wink.gif that's the problem.

$mailto = 'me@hotmail.com, someone@hotmail.com' ;

1 string

Hey it's not a problem, love to help.
P.T.
Thank-you guys sooo much. I'm going to have to provide a link somewhere to this site. You guys Rock!!
Timo
QUOTE (P.T. @ Mar 27 2004, 01:02 AM)
Thank-you guys sooo much. I'm going to have to provide a link somewhere to this site. You guys Rock!!

You're welcome. biggrin.gif
If you have any more questions, feel free to ask them. :-)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.