J'ai un gros problème avec la fonction header() utiliser pour des redirections.
J'ai ce message d'ereur :
Voici mon code source :Warning: Cannot modify header information - headers already sent by (output started at c:\site\index.php:13) in c:\site\index.php on line 3
Code : Tout sélectionner
<?php
function redirection()
{
header("Location: index.php?page=result");
exit;
}
session_start();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>'; /* Ligne 13 */
echo '<style type="text/css">
a
{
color: #94999d;
text-decoration: none;
}
a:hover
{
color: #4c5256;
}
</style>
<body>
/* Includes */
</body>
</html>';
?>
Quelqu'un pourrait m'aider.
Merci