PHP mailing script issues

Hey, I am trying to get a form mailing script to work on my website, and I was not being successful. There is one that I have been using for the past couple years, but it appears to be incompatible with some servers that I am having to use. Anyway, I tried to write a new one based on some examples that I have found online and in books, but since I am basically a moron, I have been having a very frustrating time. Here is an example of the script that I am currently battleing:

<?php
$siteName = “blah.com”;
$siteURL = “http://www.blah.com”;
$siteContact = “peter.groik.com”;

$mailMessage = "
	Name: $firstName $lastName
	Phone: $phone
	Address: $address
	City: $city
	State: $state
	Zip: $zip";
	
// Build up email header fields
$mailFrom = "From: $siteName &lt;$siteContact&gt;";
$mailTo = "Peter Osborne &lt;peter@groik.com&gt;";
$mailSubject = "blah.com Contact Form";

// Send email
mail($mailTo, $mailSubject, $mailMessage, $mailFrom);

?>

Any help would be greatly appreciated!

this is just a check that should be made before you code it:
Does your web server allow you to send a php mail function?
What I mean is, you need to make sure that your ‘php.ini’ file has all the correct settings, example: register_globals = on.

The code itself looks fine.

Cool. I will have to ask the guy who is hosting it. Unfortunately I don’t have access to that info, but I will send him a note and see if I can look into it. I just wanted to make sure my code was peachy. Thanks again!

code looks fine. Alot of Hosting services turn the mail() function off to avoid people using their servers to spam.

yeah that’s what i meant. My brother has his own hosting company & I host on it. I created a similar php mail() form & realised he had turned off the function in a php.ini file.