Accent qui se tranforme en &# 039; lors de l'insertion dans la BDD
Bonjour à tous.
Comme dis dans le titre, dans mes scripts l'accent se transforme en &# 039; une fois inséré dans la BDD.
Voici le script en question :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<!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=UTF-8" />
</head>
<body>
<?php
if ( ! empty($_POST['pseudo']))
{
$pseudo = $_POST['pseudo'];
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', '');
$query = $pdo->prepare('INSERT INTO news VALUES("", "' . $pseudo . '", "", "")');
$query->execute();
}
?>
<form action="index.php" method="post">
<p>
<input type="text" name="pseudo" />
</p>
<p>
<input type="submit" value="evnoyer" />
</p>
</form>
</body>
</html> |
Quelqu'un sait-il d'où ça vient et comment régler les problème ?
Merci d'avance.