Page 1 of 1

help with mail() again

Posted: Thu Feb 23, 2006 2:20 pm
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.

Posted: Thu Feb 23, 2006 2:40 pm
by elecktricity
nevermind all I got it, I took the variables outta quotes and it worked fine

Posted: Thu Feb 23, 2006 4:41 pm
by nickman013
thats wierd.