i am checking the user login and password on a separate page on top of which i have
session_start();
Now if the user gives wrong credentials then i want him to go back but redirect is not working it gives error headers already sent and that is because of session_start() . what could be the best way of doing it. thanks.
First check if there is not any space before session_start
or you can also do this
on start before session_start write “ob_start();” and on the page end write “ob_flush();”
This will help