Hi, I am trying to input 2 pages (login.php and newstable.php) created by PHPRunner 5.0 to one page manually created by me called index.php. I am using the include() command to accomplish this task but a get a two different errors. The errors are as follow:
ERROR #1 - Occurs when index.php loads and the include(login.php) command is executed. It appears right above the login box with the following error:
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\index.php:4) in C:\xampp\htdocs\include\dbcommon.php on line 33
I was able to fix this by editing the dbcommon.php file. I tagged the following line to be ignored by using "//" infornt of the line. This solved the issue for now. but every time i re-build the project it comes back and i have to perform this again. Any way to solve this using a different way that will fix it for good?
This is the line I ignore to fix this ERROR #1.
// header("Content-type: text/html; charset=".$cCharset);
ERROR #2_ - Occurs when index.php loads and the include(news_table.php.php) command is executed. I am not not sure what to do here because when i edit the dbcommon.php file and try to ignore "@session_start();" line stops the load of the login.php in the same page as well as any other pages talking to the database. What can I do to fix this issue?
Here is the ERROR that gets displayed after load of index.php.
PHP error happened
Technical information
Error type 8
Error description A session had already been started - ignoring session_start()
URL localhost/index.php?
Error file C:\xampp\htdocs\include\dbcommon.php
Error line 20
SQL query
Thanks for any help...I have been trying to solve this for a long time.