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!
i having issue with login. the main page is index and after i login as student, it still stay at index but it display blank body and footer part.. below is my student db connect code.. After login as student it should bring me to the student_home.php..
Is this at the very top of your page? What errors are you seeing? Both session_start and header redirects need to be called before any output has been sent to the browser.
Celauran wrote:Is this at the very top of your page? What errors are you seeing? Both session_start and header redirects need to be called before any output has been sent to the browser.
Not every page.. only student php.. Theres no error occur.. yeah i called the session_start and header at the top.. here my code..
Yes of course there is. Make sure error reporting is turned on.
here my code..
And there's your problem as I already described above; you're trying to use a header redirect after output has been sent to the browser i.e. after headers have already been sent.
Yes of course there is. Make sure error reporting is turned on.
here my code..
And there's your problem as I already described above; you're trying to use a header redirect after output has been sent to the browser i.e. after headers have already been sent.
what did u mean by my error reporting is turned off? it was on since i working on some error previously.. let me try it out about the header..