- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
- <head>
- <title>Livre d'or</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <style type="text/css">
- form, .pages
- {
- text-align:center;
- }
- .Style1 {font-family: "Book Antiqua"}
- </style>
-
- </head>
-
- <body>
- <?php
- mysql_connect("localhost", "root", "");
- mysql_select_db("sofa");
- if (isset($_POST['pseudo']) AND isset($_POST['message']))
- {
- if ($_POST['pseudo'] != NULL AND $_POST['message'] != NULL)
- {
- $pseudo = htmlentities($_POST['pseudo']);
- $message = htmlentities($_POST['message']);
- $message = nl2br($message);
- mysql_query("INSERT INTO livreor VALUES('', '$pseudo', '$message')");
- mysql_close();
- }
- }
- ?>
- <form method="post" action="livreor.php">
- <br />
- <p>
- <span class="Style1">Pseudo :</span>
- <input name="pseudo" /><br />
- <br />
- <span class="Style1">Message :</span><br />
- <textarea name="message" rows="8" cols="35"></textarea>
- <br />
- <input type="submit" value="Envoyer" />
- </p>
- </form>
- <?php
- mysql_connect("localhost", "root", "");
- mysql_select_db("sofa");
- $reponse = mysql_query("SELECT * FROM livreor ORDER BY ID DESC LIMIT 0,10");
- mysql_close();
- while ($donnees = mysql_fetch_array($reponse) )
- {
- ?>
- <p><strong><?php echo $donnees['pseudo']; ?></strong> : <?php echo $donnees['message']; ?></p>
- <?php
- }
- ?>
- </body>
- </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Livre d'or</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
form, .pages
{
text-align:center;
}
.Style1 {font-family: "Book Antiqua"}
</style>
</head>
<body>
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("sofa");
if (isset($_POST['pseudo']) AND isset($_POST['message']))
{
if ($_POST['pseudo'] != NULL AND $_POST['message'] != NULL)
{
$pseudo = htmlentities($_POST['pseudo']);
$message = htmlentities($_POST['message']);
$message = nl2br($message);
mysql_query("INSERT INTO livreor VALUES('', '$pseudo', '$message')");
mysql_close();
}
}
?>
<form method="post" action="livreor.php">
<br />
<p>
<span class="Style1">Pseudo :</span>
<input name="pseudo" /><br />
<br />
<span class="Style1">Message :</span><br />
<textarea name="message" rows="8" cols="35"></textarea>
<br />
<input type="submit" value="Envoyer" />
</p>
</form>
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("sofa");
$reponse = mysql_query("SELECT * FROM livreor ORDER BY ID DESC LIMIT 0,10");
mysql_close();
while ($donnees = mysql_fetch_array($reponse) )
{
?>
<p><strong><?php echo $donnees['pseudo']; ?></strong> : <?php echo $donnees['message']; ?></p>
<?php
}
?>
</body>
</html>