I have a mail command as follows:
- Code: Select all
<?
mail("$to_email","$subject","$content","From: $from_address");
?>
I need to be able to read the variable '$content' in from a database. '$content' will read something like this:
"Hi $fname,
Your account is as follows:
Username: $username
Password: $password".
So I need PHP to parse '$content' and fill in the variables within it ($fname, $username, $password), however when I run the script I get the following email:
From: address@domain.com
Subject: Subject
Content: Hi $fname,
Your account is as follows:
Username: $username
Password: $password
Thanks in advance.



