Store a pages output to a variable

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
FutureAndAHope
Forum Newbie
Posts: 1
Joined: Thu Aug 21, 2008 1:02 am

Store a pages output to a variable

Post by FutureAndAHope »

Hi,

I have a PHP form that posts back to a page that sends out a HTML email. What I would like is for the page to send the out put of another page as the body of the email.

i.e. Esentually what I need is a way to store a pages output to a variable.

E.g. Page postsback to SendEmail.php, SendEmail.php sends the output of Another.php. Another.php needs to access the same $_POST variables as SendEmail.php.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Re: Store a pages output to a variable

Post by Stryks »

Take a look at ob_get_clean(), the example in particular. I think it might be what you're after.

Actually, ob_get_flush() might be more the go. One of the ob_functions anyhow.
Post Reply