confused again
03-03-2005, 08:44 PM
This is really aggaivating me, every script that i ever use, whether it be created me or proffessionally created and tested by someone else, has this problem. I have a piece of code on a blank page that works fine, but when i include my other files to display the page content, the code no longer works.
Take this for example: I have a script which contains a session through a cookie, and it makes it to where when you logout, you have to log back in to see the content that was displayed on a page. It works fine, you click logout and when you try to go back it displays the login form instead of the content of the page.
Now when i add this dreadfull code to the begining of the file:
<?php
include_once ("../layout.php");
include_once ("../tables/table1.php");
?>
And this to the end:
<?php
include_once ("../tables/table2.php");
?>
The script no longer funtions correctly. When i click the logout button, and then click back on the browser it now displays the logout form, and the content that isnt suppose to be displayed unless you login.
I also found something else that strikes me as really odd. If i take out those include scripts it works fine. Now with them taken out, if i were to leave a line break at the beggining of the file, even before <?php, it stops working in the same way it does if i add those include files...What's happening here?
EDIT:
Problem solved, thanks.
Take this for example: I have a script which contains a session through a cookie, and it makes it to where when you logout, you have to log back in to see the content that was displayed on a page. It works fine, you click logout and when you try to go back it displays the login form instead of the content of the page.
Now when i add this dreadfull code to the begining of the file:
<?php
include_once ("../layout.php");
include_once ("../tables/table1.php");
?>
And this to the end:
<?php
include_once ("../tables/table2.php");
?>
The script no longer funtions correctly. When i click the logout button, and then click back on the browser it now displays the logout form, and the content that isnt suppose to be displayed unless you login.
I also found something else that strikes me as really odd. If i take out those include scripts it works fine. Now with them taken out, if i were to leave a line break at the beggining of the file, even before <?php, it stops working in the same way it does if i add those include files...What's happening here?
EDIT:
Problem solved, thanks.