Page 1 of 1

problem with form mailling script

Posted: Fri Dec 12, 2003 12:30 pm
by webgenius
I need help with this script. I'm using for a form on my site. It appears to be working but it isn't. It doesn't send the mail to the email address I specified.

-----------------------------

<meta http-equiv="refresh" content="10;URL=thank_you.php">
<?php
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$telephone=$_POST['telephone'];
$company=$_POST['company'];
$contact=$_POST['contact'];
$location=$_POST['location'];
$subject=$_POST['subject'];
$comments=$_POST['comments'];
$to="vistatech@lycos.co.uk";
$message="$firstname $lastname has just submitted this message with the subject - $subject - . The message says:\n$comments\n\n My E-mail address is: $email, Telephone is: $telephone, Company is: $company, Contact is: $contact and Location is: $location";
if(mail($to,"Message for Vista Technologies",$message,"From: $email\n")) {
echo "Your message has been sent to Vista Technologies. Thank you for contact us, we will get back to you as soon as possible. This page will redirect";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?><title>Processing Form...</title>

------------------------------

You can check it out at http://www.vista.hostrocket.com/contact_vista.php.

I dont know what else to do to it.

Thank you.

Ladi Adewumi
http://www.vistatech.5u.com

Posted: Fri Dec 12, 2003 1:09 pm
by JayBird
link doesn't work

Posted: Fri Dec 12, 2003 8:40 pm
by dev2761
thats because theres a dot at the end

Posted: Fri Dec 12, 2003 8:51 pm
by m3mn0n
I removed it and it didn't work. It was like that subdomain wasn't a valid hostrocket account.

Seems to be working alright now...