...

View Full Version : session var PRINT IN A PHP PAGE that is included in an email ?



lse123
02-26-2008, 02:49 PM
session_start() must included in a page in which, it get prints a session var ? If yes only at START OF PAGE or to the place exactly the session var get echoed ?

When a php page included in an email message:


ob_start();
include('b-to-customer.php'); //include('book-confirm-to-customer.php');
$message_customer = ob_get_clean();

then session vars print on the email on not ? I do NOT see to get print (in the email) ...


<?php session_start();
echo $_SESSION['m'];
unset($_SESSION['m']); ?>

JohnDubya
02-27-2008, 01:09 AM
session_start() should be called at the top of the page. Then, you can echo or set session variables on the rest of the page whenever you need.

http://us3.php.net/session_start



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum