Page 1 of 1

Store a pages output to a variable

Posted: Thu Aug 21, 2008 6:46 pm
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.

Re: Store a pages output to a variable

Posted: Thu Aug 21, 2008 7:21 pm
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.