help with mail() again

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

help with mail() again

Post by elecktricity »

This dosnt seem to work im not sure why

Code: Select all

<?PHP
	$to = $row['from'];
	$subject = 'Re: ';
	$subject .= $row['subject'];
	$message = $_POST['message'];
	if (mail('$to', '$subject', '$message', 'From: $admine')) {
		echo 'Message Sent';
		$emailform = 'no';
	}
	else {
		echo 'Sorry, an unexpected has occured.';
	}
?>
its inside of a query, I tried echoing the variables out and they seem to work, and it says 'Message Sent' when I email it, im not sure why this wont work. any help would be great.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

nevermind all I got it, I took the variables outta quotes and it worked fine
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

thats wierd.
Post Reply