PDA

View Full Version : email php page


esthera
04-22-2007, 10:21 AM
i have a php thank you page

now on this page I want to be able to send an email that will pull up

emailthankyou.php?orderid=xxys and then email that emailthankyou page

how can i do this without having to build the whole thank you page as a string to email?

i tried doing the following

function getemail($orderid)
{
ob_start();
include("receipt_page-email.php?orderId=$orderid");


$output = ob_get_contents();
ob_end_clean();

//}

return $output;
}

and then sending the return of this function but it does not seem to work

syosoft
04-24-2007, 04:18 AM
If i understand you correctly, i would do almost hte same thing.


function getemail($orderid)
{
/* Set expected $_GET var - or you can just have that include file expect $orderid as the function is a protected namespace, providing register_globals is not on. */
$_GET['orderid'] = $orderid;

ob_start();
include('receipt_page-email.php');
return ob_get_clean();
}