Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 11-08-2004, 09:57 PM Site Help
Novice Talker

Posts: 11
Trades: 0
i recently created the feedback form for my site (link below). I found the form but didn't have the php script to operate the form so i wrote one up, but now when u click on sned it comes up with the warning "Parse error: parse error in /home/virtual/site95/fst/var/www/html/sendmail.php on line 13" i have no idea what this means can any one help?


Feed Back form
longitude is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-08-2004, 11:15 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
you're going to need to post the PHP code
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 11-08-2004, 11:21 PM
foobar's Avatar
Extreme Talker

Posts: 225
Trades: 0
Yesh. Post the PHP code, but not only line 13. Try posting lines 5 through 15 to give us an idea. Parse errors are rarely on the line the error reporting says it is :s.
foobar is offline
Reply With Quote
View Public Profile Visit foobar's homepage!
 
Old 11-08-2004, 11:54 PM
Novice Talker

Posts: 11
Trades: 0
here is the code:

<?
$name = $_REQUEST[ 'name'];
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject']
$message = $_REQUEST['message'] ;

if (!isset($_REQUEST['email'])) {
header( "Location: http://www.the-three-broomsticks.com/feedback.html" );
}
elseif (empty($name) || empty($Email) || empty($subject) || empty($message)) {

header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );

?>

<html>
<head><title>Error</title></head>
<body>
<h1>Error</h1>
<p>
Fast on the button are we, it seems you have forgot to enter your
name, email, subject or message, please press the back button on
your browser and enter the information before continuing...
</p>
</body>
</html>

<?

}
else {
mail( "ttbbartender@the-three-broomsticks.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.the-three-broomsticks.com/thanku.html" );
}
?>
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-09-2004, 12:35 AM
foobar's Avatar
Extreme Talker

Posts: 225
Trades: 0
PHP Code:
 $subject $_REQUEST['subject'
You forgot the ; at the end of the line. It should be:

PHP Code:
 $subject $_REQUEST['subject']; 
That's all I can see anyways. Try it, and let us know what's wrong if there's another problem .
foobar is offline
Reply With Quote
View Public Profile Visit foobar's homepage!
 
Old 11-09-2004, 03:10 AM
Novice Talker

Posts: 11
Trades: 0
now its going:

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site95/fst/var/www/html/sendmail.php:9) in /home/virtual/site95/fst/var/www/html/sendmail.php on line 20

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site95/fst/var/www/html/sendmail.php:9) in /home/virtual/site95/fst/var/www/html/sendmail.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site95/fst/var/www/html/sendmail.php:9) in /home/virtual/site95/fst/var/www/html/sendmail.php on line 22

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site95/fst/var/www/html/sendmail.php:9) in /home/virtual/site95/fst/var/www/html/sendmail.php on line 23

I changed the subject line ";" ?
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-11-2004, 07:50 AM
Novice Talker

Posts: 11
Trades: 0
Can anyone provide help on my new problem?
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-11-2004, 10:51 AM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
I've never used header's before but my book says:
"For header to work it must be invoked before any character is sent to the browser."

I think this is your problem, but I do not know how to remedy it.
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 11-11-2004, 11:05 AM
foobar's Avatar
Extreme Talker

Posts: 225
Trades: 0
The mail headers have to be the very first thing output. Meaning NOTHING before them.
foobar is offline
Reply With Quote
View Public Profile Visit foobar's homepage!
 
Old 11-11-2004, 06:04 PM
Novice Talker

Posts: 11
Trades: 0
have no idea wat that means, tone it down a notch. this is the first time i ever wrote php.
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-11-2004, 06:32 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Code:
header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );
What's this for?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 11-11-2004, 07:54 PM
Novice Talker

Posts: 11
Trades: 0
that i picked up from a site to stop it from cacheing on browsers.
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-11-2004, 09:52 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Drop that for a start, it is meaningless.

You are having problems with that, so ditch it.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 11-11-2004, 09:54 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Quote:
Originally Posted by foobar
The mail headers have to be the very first thing output. Meaning NOTHING before them.
The headers can be declared at any time, aslong as they are not called upon previously.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 11-11-2004, 11:38 PM
Novice Talker

Posts: 11
Trades: 0
ok I took it out and now the code looks as follows:

<?
$name = $_REQUEST[ 'name'];
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];

if (!isset($_REQUEST['email'])) {
header( "Location: http://www.the-three-broomsticks.com/feedback.html" );
}
elseif (empty($name) || empty($Email) || empty($subject) || empty($message))
?>

<html>
<head><title>Error</title></head>
<body>
<h1>Error</h1>
<p>
Fast on the button are we, it seems you have forgot to enter your
name, email, subject or message, please press the back button on
your browser and enter the information before continuing...
</p>
</body>
</html>

<?

}
else {
mail( "ttbbartender@the-three-broomsticks.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.the-three-broomsticks.com/thanku.html" );
}
?>



but you'd think it would work now, but no now when you try and send something it goes as follows:


Parse error: parse error in /home/virtual/site95/fst/var/www/html/sendmail.php on line 35


Theres one more thing, ive included the options for whom the mail should be sent to, would this require more code, im not sure the current code will allow this feature to work.
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-24-2004, 04:06 AM
Novice Talker

Posts: 11
Trades: 0
what can i do now?
longitude is offline
Reply With Quote
View Public Profile
 
Old 11-30-2004, 06:57 PM
Novice Talker

Posts: 11
Trades: 0
Im still looking for help on this matter if anyone can assist.
longitude is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Site Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.37572 seconds with 12 queries