include 'header.php'; // ... some code header('Location:index.php'); exit; The above code keeps giving me an issue with the redirect. The error is the following:
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/testygubbins/OO/test/header.php:15) in /Applications/MAMP/htdocs/testygubbins/OO/test/form.php on line 16.
What should I be doing to make it work?
header.php code:
<?php include 'class.user.php'; include 'class.Connection.php'; $date = date('Y-m-j'); ?> <html> <head> <link rel=StyleSheet href="css/style.css" type="text/css" media=screen> <title>Test</title> </head> <body> <div id="page">