Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    227
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    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?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    May 2006
    Posts
    227
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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 Attached Thumbnails How to set correct session variable inside HTML?-php_error1.jpg  
    Last edited by toplisek; 01-18-2012 at 11:58 AM.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Maybe I posted small information and I will add new information details.
    It looks still like small. Where's your PHP tags?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder
    Join Date
    May 2006
    Posts
    227
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question

    You can set
    PHP Code:

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

                  }

    ?> 
    Last edited by toplisek; 01-18-2012 at 12:47 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •