17.03.2018, 05:36
header redirect method doesn't work if something has already been sent to the output stream, make sure there is no echo statement or HTML code above the header() line, also make sure that there is no faulty code above header() line which can potentially cause an error or warning message to be echoed and use exit() function after using header() function to avoid extra processing.