WebSite X5Help Center

 
David A.
David A.
User

Session in the Header  en

Autor: David A.
Visited 1739, Followers 1, Udostępniony 0  

I'm working with X5, PHP and MYSQL.  Well, I created a members area using php and session scripts to make sure each user is logged in before going to other areas of the site.  To do this, the SESSSION function needs to be the FIRST line in the php page.  The only thing X5 allows me to do is put it in there "before the header closes" in the advance settings.  However, this is no good because everytime I "export" the site, X5 creates metadata and CSS syle sheets that go before my custom <?php SESSION?> function.  It is such a pain for me to go into each PHP file and manually move the session data to the top of the page, everytime I export the site.  It's getting old quick.  EIther can someone help me think of another way to do this (without using X5's access managemnt feature), or X5, please address this in an update ASAP!!  You're killing me.


Thanks!

Dave

Posted on the
3 ODPOWIEDZI
Incomedia
Claudio D.
Incomedia

Hello David,

If you choose the option "Before CLosing the HTML Tag" then the code will be added as first line of the file before the <html> tag starts.

The code added will only be visible in the file once exported and in the preview it will not show up.

Please feel free to write back if you need more information.

Czytaj więcej
Posted on the from Claudio D.
David A.
David A.
User
Autor

Thanks for the advice, I believe the session data needs to be the first line in the code, and putting it before the HTML tag starts doesn't accomplish that.

Czytaj więcej
Posted on the from David A.
Incomedia
Claudio D.
Incomedia

Hello David,

In this way the code will be in the first line. This option has been added for these cases.

Many thanks!

Czytaj więcej
Posted on the from Claudio D.