etnastyles Posted April 23, 2010 Share Posted April 23, 2010 sessions stopped working i.e. passing to the second page because i was doing a <php echo header(); ?> just after the body tag?? why does this happen??? function header() { $header = "<div id=\"masthead\"> <div id=\"logo\"> <a title=\"Return to the home page\" href=\"#\"/></a> </div> <ul id=\"main-nav\" class=\"clearfix\"> <li class=\"hidden\"> <a href=\"#accesscontent\">Skip to content</a> </li> <li id=\"masthead_whatWeDo\" class=\"whatWeDo\"> <a href=\"#\">What we do</a> <div id=\"servicesSubMenu\" style=\"display: none;\"> <ul> <li style=\"margin-right: 60px;\"> <h3>Digital</h3> <ul> <li> <a href=\"VOD-IPTV-delivery.aspx\">VOD/IPTV Delivery</a> </li> <li> <a href=\"digital-distribution.aspx\">Digital Distribution</a> </li> <li> <a href=\"digital-cinema.aspx\">Digital Cinema</a> </li> </ul> <h3>Disc</h3> <ul> <li> <a href=\"blu-ray-duplication.aspx\">Blu-ray</a> </li> <li> <a href=\"dvd-duplication.aspx\">DVD</a> </li> <li> <a href=\"cd-duplication.aspx\">CD</a> </li> <li> <a href=\"authoring-menu-design.aspx\">Authoring and Menu Design</a> </li> <li> <a href=\"packaging.aspx\">Packaging Gallery</a> </li> <li> <a href=\"artwork.aspx\">Artwork</a> </li> </ul> <h3>Tape</h3> <ul> <li> <a href=\"dubbing.aspx\">Dubbing</a> </li> <li> <a href=\"conversions.aspx\">Conversions</a> </li> <li> <a href=\"editing.aspx\">Editing</a> </li> <li> <a href=\"QC-QAR.aspx\">QC/QAR</a> </li> </ul> <h3>Flash memory</h3> <ul> <li> <a href=\"usb-branding-duplication.aspx\">USB Branding and Duplication</a> </li> <li> <a href=\"usb-gallery.aspx\">USB Gallery</a> </li> </ul> </li> <li> <h3> <a href=\"licensing-content.aspx\">Licensing content </a> </h3> <h3>Accessibility</h3> <ul> <li> <a href=\"subtitling.aspx\">Subtitling</a> </li> </ul> <h3>Security</h3> <ul> <li> <a href=\"copy-protection.aspx\">Copy Protection</a> </li> <li> <a href=\"forensic-watermarking.aspx\">Forensic Watermarking</a> </li> </ul> <h3> <a href=\"secure-library-storage.aspx\">Library</a> </h3> </li> </ul> </div> </li> <li id=\"masthead_caseStudies\"> <a href=\"casestudyList.aspx\">Our work</a> </li> <li id=\"masthead_Blog\"> <a href=\"/blog/\">Blog</a> </li> <li id=\"masthead_contactUs\"> <a href=\"contact.aspx\">Contact us</a> </li> </ul> </div>"; return($header); } Quote Link to comment https://forums.phpfreaks.com/topic/199473-_session-stopped-working-due-to-menu/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 23, 2010 Share Posted April 23, 2010 header() is the name of a php built-in function. As soon as you used that name for your function your code produced a fatal php error. Please develop and debug php code on a system with error_reporting set to E_ALL and display_errors set to ON in your master php.ini to get php to report and display all the errors it detects. You will save a TON of time. Quote Link to comment https://forums.phpfreaks.com/topic/199473-_session-stopped-working-due-to-menu/#findComment-1046973 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.