PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hey gusy, i made this login and auth part for my website. learnt how to do it from my php book i have ("Wrox - beginning php5, apache, mysql web development")
everything worked fine when i had only the auth on my mail index.php page, butn nbow i get this error on the login page
ERROR:
Warning: Cannot modify header information - headers already sent by (output started at /home2/datainfi/public_html/geovis/channel7/login.php:6) in /home2/datainfi/public_html/geovis/channel7/login.php on line 16
You're receiving that error because there has already been some output sent to the client, you need to ensure headers are sent before ANY output, that includes whitespace, is sent.
now if you have no problem with that, check the way you use echo() function.
I completely recommend to put your HTML strings in a variable first then echo it when you have nothing more to do such as conditions and loops. This way you can freely use the header() function without any error.