par
jojo » 01 mai 2005, 21:40
cela ne marche tjr pas :|
j ai réusie a coriger avan de lire ton message pour le s1er et voissie une nouvel erreur! erreur ligne: 29 : $chat=mysql_query(select * from chat
order by id limit 0,9);
---------------------------------
code:
<html>
<head>
<title> testp </title>
<link rel="stylesheet" media="screen" type="text/css" title="blue" href="sombre.css"/>
</head>
<body>
<form action="testmysql.php" method="POST"><p>
Pseudo <input type="text" name="pseudo"/></br>
Message <input type="text" name="mess"/></P>
</form>
<?
if(isset($_POST['pseudo']) and isset($_POST['mess']))
{
if($_POST['pseudo'] != null and $_POST['mess'] != null)
{
mysql_connect("localhost","root");
mysql_select_db("exercice");
$pseudo=htmlentities($_post['pseudo']);
$mess=htmlentities($_post['mess']);
mysql_query("Insert into chat value('','$mess','$pseudo'");
mysql_close();
}
}
?>
<p>t'chat</p>
<?
mysql_connect("localhost","root");
mysql_select_db("exercice");
$chat=mysql_query(select * from chat order by id limit 0,9);
while($text=mysql_fetch_array($chat))
{
?><p><?echo $text['pseudo'];?> ecrit <?echo $text['mess'];?><?
}
Mysql_close();
?>
</body>
<html>
cela ne marche tjr pas :|
j ai réusie a coriger avan de lire ton message pour le s1er et voissie une nouvel erreur! erreur ligne: 29 : $chat=mysql_query(select * from chat
order by id limit 0,9);
---------------------------------
code:
<html>
<head>
<title> testp </title>
<link rel="stylesheet" media="screen" type="text/css" title="blue" href="sombre.css"/>
</head>
<body>
<form action="testmysql.php" method="POST"><p>
Pseudo <input type="text" name="pseudo"/></br>
Message <input type="text" name="mess"/></P>
</form>
<?
if(isset($_POST['pseudo']) and isset($_POST['mess']))
{
if($_POST['pseudo'] != null and $_POST['mess'] != null)
{
mysql_connect("localhost","root");
mysql_select_db("exercice");
$pseudo=htmlentities($_post['pseudo']);
$mess=htmlentities($_post['mess']);
mysql_query("Insert into chat value('','$mess','$pseudo'");
mysql_close();
}
}
?>
<p>t'chat</p>
<?
mysql_connect("localhost","root");
mysql_select_db("exercice");
$chat=mysql_query(select * from chat order by id limit 0,9);
while($text=mysql_fetch_array($chat))
{
?><p><?echo $text['pseudo'];?> ecrit <?echo $text['mess'];?><?
}
Mysql_close();
?>
</body>
<html>