Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-18-2012, 09:36 AM   PM User | #1
toplisek
Regular Coder

 
Join Date: May 2006
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
toplisek has a little shameless behaviour in the past
Question How to set correct session variable inside HTML?

I have set code like:
PHP Code:
  <tr><td class="" colspan="0" style="">Hello,'&nbsp;'.$_SESSION["var"].,</td
How to set in correct way without PHP error?
toplisek is offline   Reply With Quote
Old 01-18-2012, 10:34 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
PHP Code:
echo '<tr><td class="" colspan="0" style="">Hello, &nbsp;'.$_SESSION["var"].',</td>  '
PS: Don't you know why using tables for layout is stupid?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-18-2012, 10:46 AM   PM User | #3
toplisek
Regular Coder

 
Join Date: May 2006
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
toplisek has a little shameless behaviour in the past
Question

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:
PHP Code:
<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.
Attached Thumbnails
Click image for larger version

Name:	PHP_error1.jpg
Views:	10
Size:	24.0 KB
ID:	10721  

Last edited by toplisek; 01-18-2012 at 10:58 AM..
toplisek is offline   Reply With Quote
Old 01-18-2012, 11:27 AM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
Maybe I posted small information and I will add new information details.
It looks still like small. Where's your PHP tags?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-18-2012, 11:45 AM   PM User | #5
toplisek
Regular Coder

 
Join Date: May 2006
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
toplisek has a little shameless behaviour in the past
Question

You can set
PHP Code:

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

              }

?> 

Last edited by toplisek; 01-18-2012 at 11:47 AM..
toplisek is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:52 AM.


Advertisement
Log in to turn off these ads.