...

View Full Version : How to set correct session variable inside HTML?



toplisek
01-18-2012, 10:36 AM
I have set code like:


<tr><td class="" colspan="0" style="">Hello,'&nbsp;'.$_SESSION["var"].',</td>



How to set in correct way without PHP error?

abduraooft
01-18-2012, 11:34 AM
echo '<tr><td class="" colspan="0" style="">Hello, &nbsp;'.$_SESSION["var"].',</td> ';

PS: Don't you know why using tables for layout is stupid (http://www.hotdesign.com/seybold/)?

toplisek
01-18-2012, 11:46 AM
Thank you to notice me regarding TABLE structure. I have to use it inside e-mail.

Regarding script it is issue with SESSION as $variable works but added SESSION will post an error like enclosed image.

Maybe I posted small information and I will add new information details.

Please find issue as image and all TABLE content:


<body>
$message = <<<MYMESSAGE

<table width="700" bgcolor="#000000" cellspacing="10" cellpadding="0" align="center" border="0">
<tr><td align="center"></td>
</tr>
</table>
<table width="700" bgcolor="#000000" cellpadding="3" cellspacing="0" align="center" border="0">
<tr><td class="" colspan="0" style="">Hello,$_SESSION["var"],</td>;
</tr>
</table>
MYMESSAGE;
</body>

</html>


I have to insert SESSION variable inside template file.

abduraooft
01-18-2012, 12:27 PM
Maybe I posted small information and I will add new information details.
It looks still like small. Where's your PHP tags?

toplisek
01-18-2012, 12:45 PM
You can set



function Mymail($message)
{
$message = <<<Message

}

?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum