corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Really stressed now,


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Really stressed now,
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:10   View User's Profile U2U Member Reply With Quote

Right wrote a php contact form did not work despite the script being perfect and checked about a million times, decided it in perl then, wrote the script and once again it does not work. any ideas why not goes straight to the error page i set up both times
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 20:19   View User's Profile U2U Member Reply With Quote

i take it, it emails you??
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:23   View User's Profile U2U Member Reply With Quote

it should e-mail be but some reason it does not work
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 20:26   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Jodi_the_g
it should e-mail be but some reason it does not work

email me the script mate and ill run it on my server and see if i can get it going
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
22nd Nov 04 at 20:26   View User's Profile U2U Member Reply With Quote

Is the mail(); set up on the server?

I think it is by default
Nismo
Member

Registered: 12th Sep 02
User status: Offline
22nd Nov 04 at 20:29   View User's Profile U2U Member Reply With Quote

easy option use CGI
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:32   View User's Profile U2U Member Reply With Quote

do it in cgi as well nath but it just ain't working getting really fuck off now
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 20:34   View User's Profile U2U Member Reply With Quote

write a simple script to send an email, then work from that....atleast then you will know that the email stuff should be working etc
Nismo
Member

Registered: 12th Sep 02
User status: Offline
22nd Nov 04 at 20:36   View User's Profile U2U Member Reply With Quote

did you find out if it had the send mail function on the server?
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:36   View User's Profile U2U Member Reply With Quote

No but i got one installed and i know that that is correct and working just so confused now as i have tried everything
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 20:40   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Jodi_the_g
No but i got one installed and i know that that is correct and working just so confused now as i have tried everything


wack some echos or print to screens at certain points so you can see how far the script is going to - thats if the error thats coming up is fairly basic and isnt saying anything etc etc

eitherway lad, wack us the script if you want and ill see what i can do
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:41   View User's Profile U2U Member Reply With Quote

e-mailed it to your hotmail account
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 20:50   View User's Profile U2U Member Reply With Quote

havnt had chance to look at it properly, but its something to do with the form data parsing at the bottom (under main program) thats causing it i think.

print the strings to a text file or screen to see if there ok
Tim
Site Administrator

Avatar

Registered: 21st Apr 00
User status: Offline
22nd Nov 04 at 20:51   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Nismo
easy option use CGI


Um, and what do you think Perl and PHP are applications of? CGI is an interface (it's even in the name )
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 20:52   View User's Profile U2U Member Reply With Quote

well its still pssing me right off
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
22nd Nov 04 at 21:00   View User's Profile U2U Member Reply With Quote

<?php

$to = $contactemail;
$subject = "Subject";
$message_send = "
<html>
<body>
<p>
Text goes here
</p>

</body>
</html>";

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: bot@domain.co.uk";

mail ($to, $subject, $message_send, $headers);

?>

Thats the code that I use. I've never had any probs with it
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 22:12   View User's Profile U2U Member Reply With Quote

Right got it to semi work now just messup on the last line of the script
now getting a
Parse error: parse error in /home/httpd/vhosts/jodimyatt.co.uk/httpdocs/feedback.php on line 47

thats the last line of the code and is just ?>
ed
Member

Registered: 10th Sep 03
User status: Offline
22nd Nov 04 at 22:15   View User's Profile U2U Member Reply With Quote

Should just need a ?> or you will have left out a closing statement somewhere - make sure all the if's while's e.t.c... start with a { and end with a }
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 22:18   View User's Profile U2U Member Reply With Quote

<?
$mailto = 'jodimyatt@evolutiondevelopments.org.uk' ;
$subject = "Contact Us" ;
$formurl = "http://jodimyatt.co.uk/contact.htm" ;
$errorurl = "http://www.jodimyatt.co.uk/error.htm" ;
$thankyouurl = "http://www.jodimyatt.co.uk/thankc.htm" ;

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

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) ||empty($surname) || empty($phone) || empty($company) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
//}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}

$messageproper =

"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$name .
$surname .
$company .
$phone .
$email .
$url .
$comments .
"\n\n------------------------------------------------------------\n" ;

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

Thats the script
Nismo
Member

Registered: 12th Sep 02
User status: Offline
22nd Nov 04 at 22:20   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Tim
quote:
Originally posted by Nismo
easy option use CGI


Um, and what do you think Perl and PHP are applications of? CGI is an interface (it's even in the name )




STFU Newbie

i do not work with PHP and Perl like you chump
Laney
Member

Registered: 6th May 03
Location: Leeds
User status: Offline
22nd Nov 04 at 22:21   View User's Profile U2U Member Reply With Quote

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

I think?

Edit - ?

[Edited on 22-11-2004 by Laney]
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
22nd Nov 04 at 22:22   View User's Profile U2U Member Reply With Quote

nope
ed
Member

Registered: 10th Sep 03
User status: Offline
22nd Nov 04 at 22:26   View User's Profile U2U Member Reply With Quote

I'm sure you don't need the slashes in the mail() part... I think
Dom
Member

Registered: 13th Sep 03
User status: Offline
22nd Nov 04 at 23:12   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Nismo
quote:
Originally posted by Tim
quote:
Originally posted by Nismo
easy option use CGI


Um, and what do you think Perl and PHP are applications of? CGI is an interface (it's even in the name )




STFU Newbie

i do not work with PHP and Perl like you chump



victor meldrew is coming out
Nismo
Member

Registered: 12th Sep 02
User status: Offline
22nd Nov 04 at 23:13   View User's Profile U2U Member Reply With Quote


  <<  1    2  >>
New Topic

New Poll

Corsa Sport » Message Board » Off Day » Really stressed now, 22 database queries in 0.1315169 seconds