PHP script problem - please help!

Hi all,

I have a PHP email script that’s driving me mad. I bought a flash template and this came with it. There’s no reason for it not to work. My hosting company sent another script that apparently works on my server but it’s very different to the one I have and I have no idea how to transform it to work.

I’ve tried reloading the original file. I’ve checked spelling of my email addresses and replaced the yoursite.com with my domain name. I just can’ figure it out and it’s driving me mad. I need this up now, please help!

The script for the site reads like this:

<?php
$sendTo = "you@yoursite.com";
$subject = "Website info";
$message = $_GET['message'];
$email = $_GET['email'];
$name = $_GET['name'];
	//send mail
	$headers  = "From: $email
";
	//$headers .= 'MIME-Version: 1.0' . "
";
	//$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
    $msg = "The following information has been submited via website:

Name:".$name."

E-mail:".$email."

Message:".$message."";
	mail($sendTo, $subject, $msg, $headers);
	echo "status=formOk";
?>

The script that my hosting company sent reads like this:

<?php
$res = mail("attachments@hostingco.net", "Test PHP Mailer Script", "Hi, this is a test script", "From: root@yoursite.com", "-froot@yoursite.com"); 
 if($res == 1){echo "Email sent sucsessfully."; } ?>

Can anyone see what might be going wrong? Any ideas how to transform the code to work with mine?

Thanks in advance!!!