i'm trying on another browser (chromium) and then i have the same mistake!The page is not redirected correctly
Firefox has detected that the server is redirecting the request for this address in a way that will not succeed.
The cause of this problem may be the disabling or refusal of cookies.
I have removed all the coockies from my browsers in the menu: tools> preferences
when looking on the internet I found this: deleted the
Code: Select all
cookies.sqlite and cookies.sqlite-journa
I can not find the location in the tree of my hard disk file:
Code: Select all
cookies.sqlite
someone know the problem?
here my php's code
Code: Select all
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Mini-chat</title>
</head>
<style>
form
{
text-align:center;
}
</style>
<body>
<form action="minichat_post.php" method="post">
<p>
<label for="pseudo">Pseudo</label> : <input type="text" name="pseudo" id="pseudo" /><br />
<label for="message">Message</label> : <input type="text" name="message" id="message" /><br />
<input type="submit" value="Envoyer" />
</p>
</form>
<?php
// Connexion à la base de données
try
{
$bdd = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
// Récupération des 10 derniers messages
$reponse = $bdd->query('SELECT pseudo, message, DATE_FORMAT(date_message, \'%d/%m/%Y à %Hh%imin\') AS date_message_fr FROM minichat ORDER BY ID DESC LIMIT 0, 10');
// Affichage de chaque message (toutes les données sont protégées par htmlspecialchars)
while ($donnees = $reponse->fetch())
{
echo '<p><strong>' . htmlspecialchars($donnees['date_message_fr']).' >> Pseudo -> '. htmlspecialchars($donnees['pseudo']) . '</strong> : ' . htmlspecialchars($donnees['message']) . '</p>';
}
$reponse->closeCursor();
?>
<?php header('Location: minichat_post.php');?>
</body>
</html>
Philippe