My friend has a wordpress site and wants me to add my premade PHP/Mysql login system. Currently i'm trying to insert PHP pages into the wordpress templates using this plugin: http://www.willmaster.com/software/WPplugins/.
The plugin lets me add php code to the page using this syntax:
[insert_php] include "account/login.php"; [/insert_php]
However, doing this creates an issues with sessions as the page header is already sent by the wordpress page before the php file is included. I'm getting the following error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at ...) Warning: Cannot modify header information – headers already sent by (output started at...
Any ideas how to fix this?
You can write the code for your login at the top in the theme's header.php or simply don't have session_start() in login.php. Or use session_status() to check if the session has started.
You cant start a session after the head becuse data allready started to send to browser. You need to include your code in the head before any code