iKettles Posted May 3, 2008 Share Posted May 3, 2008 I'm currently working on a login script for my website. On the include login script I want a redirect on one of the parts. I've used the header( function but I get an error saying "Cannot modify header information - headers already sent by" and then it says my index file. Weird thing is there is no header('s in my index file. How can I redirect within this script? Link to comment https://forums.phpfreaks.com/topic/103995-redirect-inside-a-script/ Share on other sites More sharing options...
BlueSkyIS Posted May 3, 2008 Share Posted May 3, 2008 http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Link to comment https://forums.phpfreaks.com/topic/103995-redirect-inside-a-script/#findComment-532427 Share on other sites More sharing options...
iKettles Posted May 4, 2008 Author Share Posted May 4, 2008 Thanks for the help. Another question, I'm using a PHP sign in form and if the result turns up false (the result being the password in the database) then it displays an error message saying this. The base scrip has used die() which AFAIK kills the script and displays the message after that. Would it be a security vulnerability not killing the script or could I simply get rid of die() and just have an include()? Link to comment https://forums.phpfreaks.com/topic/103995-redirect-inside-a-script/#findComment-532490 Share on other sites More sharing options...
blueman378 Posted May 4, 2008 Share Posted May 4, 2008 no it would not be a security vunerability, otherwise the page loading would make no sense as half of it wouldnt load after you showed the message Link to comment https://forums.phpfreaks.com/topic/103995-redirect-inside-a-script/#findComment-532501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.