probleme affichage
Posté : 02 sept. 2006, 11:09
Salut tout le monde,
Donc voila j'ai crée un script ou on entre des informations, et quand je demande a voir ces info rien ne s'affiche
Page formulaire :
La BDD SQL :
Page Affichage:
Donc voila j'ai crée un script ou on entre des informations, et quand je demande a voir ces info rien ne s'affiche
Page formulaire :
<?
require("admin/ad_conf.inc.php");
if (!empty($_POST['mail']) AND !empty($_POST['titre']) AND !empty($_POST['theme']) AND !empty($_POST['couleur']) AND !empty($_POST['img1']) AND !empty($_POST['img2']) AND !empty($_POST['img3']) AND !empty($_POST['img4']) AND !empty($_POST['admin']) AND !empty($_POST['description'])) // Si les variables existent
{
if ($_POST['mail'] != NULL AND $_POST['titre'] != NULL AND $_POST['theme'] != NULL AND $_POST['couleur'] != NULL AND $_POST['img1'] != NULL AND $_POST['img2'] != NULL AND $_POST['img3'] != NULL AND $_POST['img4'] != NULL AND $_POST['admin'] != NULL AND $_POST['description'] != NULL) // Si on a quelque chose à enregistrer
{
mysql_connect("$host", "$user", "$mdp");
mysql_select_db("$user");
$mail = htmlentities ($_POST['mail']);
$titre = htmlentities ($_POST['titre']);
$theme = htmlentities ($_POST['theme']);
$couleur = htmlentities ($_POST['couleur']);
$img1 = htmlentities ($_POST['img1']);
$img2 = htmlentities ($_POST['img2']);
$img3 = htmlentities ($_POST['img3']);
$img4 = htmlentities ($_POST['img4']);
$admin = htmlentities ($_POST['admin']);
$description = htmlentities ($_POST['description']);
mysql_query("INSERT INTO kit VALUES('', '$mail', '$titre', '$theme', '$couleur', '$img1', '$img2', '$img3', '$img4', '$admin', '$description',)");
mysql_close();
}
}
?>
<small>(*)<i>Réponce obligatoire !!!</i></small><br>
<form method="POST" action="v_kit.php">
*Mail:<br>
<input type="TEXT" size="50" name ="mail">
<br><br>
*Titre du site:<br>
<input type="TEXT" size="50" name ="titre">
<br><br>
*Thème(s):<br>
<input type="TEXT" size="50" name ="theme">
<br><br>
*Couleur(s):<br>
<input type="TEXT" size="50" name ="couleur">
<br><br>
Image(s):<br>
1. <input type="TEXT" size="50" name ="img1">
<br>
2. <input type="TEXT" size="50" name ="img2">
<br>
3. <input type="TEXT" size="50" name ="img3">
<br>
4. <input type="TEXT" size="50" name ="img4">
<br><br>
*Partie Admin:<br>
<input type="TEXT" size="50" name ="admin"> <small><i>Répondre par <b>OUI</b> ou <b>NON</b>.</i></small>
<br><br>
Description:<br>
<textarea name="description" rows="8" cols="35"></textarea>
<br><br><br>
<input type="SUBMIT" value="OK"></form>
<br><br>
<small><i>La partie administration comprend, un système de statisque, de création de menu, de création de lien partenaire, un système d'article.</i>
La BDD SQL :
Code : Tout sélectionner
CREATE TABLE `kit` (
`id` int(11) NOT NULL auto_increment,
`titre` varchar(255) NOT NULL default '',
`theme` text NOT NULL default '',
`couleur` text NOT NULL default '',
`police` text NOT NULL default '',
`img1` text NOT NULL default '',
`img2` text NOT NULL default '',
`img3` text NOT NULL default '',
`img4` text NOT NULL default '',
`admin` text NOT NULL default '',
`description` text NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
<?
require("admin/ad_conf.inc.php");
mysql_connect("$host", "$user", "$mdp");
mysql_select_db("$user");
$retour = mysql_query('SELECT * FROM kit ORDER BY id DESC');
while ($donnees = mysql_fetch_array($retour))
{
?>
Votre mail : <font color="#009900"><? echo $donnees['mail']; ?><br></font>
Le titre de votre site : <font color="#009900"><? echo $donnees['titre']; ?><br></font>
Le(s) thème(s) : <font color="#009900"><? echo $donnees['theme']; ?><br></font>
La/Le(s) couleur(s) : <font color="#009900"><? echo $donnees['couleur']; ?><br></font>
Image(s):<br>
1.<? echo $donnees['img1']; ?><br>
2.<? echo $donnees['img2']; ?><br>
3.<? echo $donnees['img3']; ?><br>
4.<? echo $donnees['img4']; ?><br>
Partie Admin : <font color="#009900"><? echo $donnees['admin']; ?><br></font>
Description : <font color="#009900"><? echo $donnees['description']; ?><br></font>
<?
}
// Fin de la boucle, le script est terminé !
?>
<br><br>
<a href="index.php" border="0" class="valid"> Continuer >></a>