I have a mix of HTML/PHP stored in mysql as a template. I run eval() to populate the variables from the template. I can get it to display/view properly, however I want to take the actual final, evaluated HTML and email it to myself.
It seems like all I would need to do is store the eval()'d code in a variable, and then include it in the basic mail() function.
Is this even possible? Is there some other way of doing this?
Thanks!
Is it possible to store eval() results in a variable?
Moderator: General Moderators
-
liminalhigh
- Forum Newbie
- Posts: 3
- Joined: Fri Aug 27, 2004 5:27 pm
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Something like:
Where the php code and stuff is in the $code variable.
Code: Select all
eval("\$variable = \$code;");-
liminalhigh
- Forum Newbie
- Posts: 3
- Joined: Fri Aug 27, 2004 5:27 pm
-
liminalhigh
- Forum Newbie
- Posts: 3
- Joined: Fri Aug 27, 2004 5:27 pm
Sorry, but I don't get it. I'm not actually using echo anywhere... I am just trying to fit $variable into the mail() function:
for example:
for example:
Code: Select all
<?php
eval("\$strBody = \$template;");
mail ($strMailTo, $strSubject, $strBody, $strXHeaders);
?>-
ldomingues
- Forum Commoner
- Posts: 41
- Joined: Fri Aug 06, 2004 1:15 pm
- Location: Portugal