Effectivement maintenant ça fonctionne ^^
en revanche je rencontre à nouveau un problème (désolé =/)
donc dans le tuto présenté dans mon premier message
on me demande de créer un fichier "connect.php" que j'ai donc "inclut" dans mon script php "tchat.php"
<?php
session_start();
if(!isset($_SESSION["pseudo"]) || empty($_SESSION["pseudo"])){
header("location:index1.php");
}
include"connect.php";
?>
<!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" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="styles1.css" type="text/css" media="screen" />
</head>
<body>
<div id="conteneur" style="width;94%;">
<h1>Connectez en tant que:<?php echo $_SESSION["pseudo"]; ?></h1>
<div id="tchat">
<?php
$sql = "SELECT * FROM messages ORDER BY date DESC LIMIT 15";
$req = mysql_query($sql) or die(mysql_error());
while($data = mysql_fetch_assoc($req)){
?>
<p><strong><?php echo $data["pseudo"]; ?></strong> : <?php echo htmlentities($data["commentaire"]); ?></p>
<?php
}
?>
</div>
</div>
<div class="tchatForm" style="position;fixed;bottom;0;width;100%;">
<form method="post" action="#">
<div style="margin-right:110%;">
<textarea name="message" style="width:100%;"></textarea>
</div>
<div style="position:absolute; top:12%; right:0;">
<input type="submit" value="valider"/>
</div>
</form>
</body>
</html>
et voici le fameux "connect.php":
<?php
mysql_connect("'localhost','root',");
mysql_select_db('tchat');
mysql_query("'SET NAMES' 'utf8'");
?>
et donc mon problème est que quand j'actualise ma page de redirection des erreurs s'affichent :
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: H�te inconnu. in C:\wamp\www\tchat\connect.php on line 2
Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: H�te inconnu. (trying to connect via tcp://localhost,'root',:3306) in C:\wamp\www\tchat\connect.php on line 2
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: H�te inconnu. in C:\wamp\www\tchat\connect.php on line 2
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\tchat\connect.php on line 3
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\wamp\www\tchat\connect.php on line 3
Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\tchat\connect.php on line 4
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\tchat\connect.php on line 4
Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\tchat\tchat.php on line 22
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\tchat\tchat.php on line 22
Access denied for user 'SYSTEM'@'localhost' (using password: NO)
je voudrait simplement s'avoir ce que veux dire ces erreurs
