I have a mail function that sends out an email with content from an sql db.
The message that will be included in the email will be taken from the sql db. The message in the sql db has variables in it.....
example:
In the database:
Hey $name, $owner_name here
Everything works fine, except i cant get PHP to print out that var when it sends the email.
So the final email that goes out is:
Hey $name, $owner_name here
When it should be:
Hey BOB, Johnny here
Here's the mail function code;
get_email_settings($db_host, $db_user, $db_pswrd, $db_name, $email, $pro_msg,$pro_subject);
mail($email_usr, $pro_subject, $pro_msg, "From: $my_email");
Now I've also tried: (NOTE: the double quotes)
mail($email_usr, "$pro_subject", "$pro_msg", "From: $my_email");
And I've also tried inserting the content into the DB with double quotes so: "Hey $name, $owner_name here"
instead of Hey $name, $owner_name here
...
Both do the same thing...
Any Ideas?