
<form action="traitement_article.php" method="post" enctype="multipart/form-data">

<p>Libell&eacute; * : <br /><input type="text" size="30" name="libelle" value="<?php
echo $libelle; ?>" /></p>




<p style="display:none;">Image : <br /><input type="file" name="image" /></p>


<?php
include('connexion_objet.php');
?>
Grande cat&eacute;gorie*<br />
<select name="grande_categorie" id="grande_categorie">


<?php 

if(isset($_GET['id_grande']))
{
include('connexion_mysql.php');
$retour1 = mysql_query('SELECT * FROM grande_categorie WHERE id = '.$id_grande.'');
while ($donnees = mysql_fetch_array($retour1)) // On fait une boucle
{
$id_grande_envoye =  stripslashes($donnees['id']);
$libelle_grande_envoye =  stripslashes($donnees['libelle']);

}

?>

<?php echo '<option selected="selected" value="'.$id_grande_envoye.'">'.$libelle_grande_envoye.'</option>';}?>


<option value="">S&eacute;lectionner une grande cat&eacute;gorie</option>
<?php

if(!isset($_GET['id_grande']))
{
$id_grande_envoye = 0;
}
$req = "SELECT id,libelle FROM grande_categorie  WHERE id <> '".$id_grande_envoye."' ORDER BY id";
$rep = mysqli_query($db, $req);
while ($row = mysqli_fetch_array($rep)) {
    echo "<option value=".$row['id'].">".$row['libelle']."</option>";
}
?>
</select></p>
	<p>Cat&eacute;gorie<br />
	<?php if(!isset($_GET['id_categorie']))
{ 
echo'<select name="categorie" id="categorie">';}?>
	
	
	<?php 

if(isset($_GET['id_categorie']))
{
include('connexion_mysql.php');
$retour1 = mysql_query('SELECT * FROM categorie WHERE id = '.$id_categorie.'');
while ($donnees = mysql_fetch_array($retour1)) // On fait une boucle
{
$id_categorie_envoye =  stripslashes($donnees['id']);
$libelle_categorie_envoye =  stripslashes($donnees['libelle']);

}

?>

<?php echo '<select name="categorie">'; ?>

<?php echo '<option selected="selected" value="'.$id_categorie_envoye.'">'.$libelle_categorie_envoye.'</option>';}?>
	
	
<option value="">S&eacute;lectionner une cat&eacute;gorie</option>
<?php

if(!isset($_GET['id_categorie']))
{
$id_categorie_envoye = 0;
}

$req = "SELECT id, id_grande, libelle FROM categorie  WHERE id <> '".$id_categorie_envoye."' ORDER BY id";
$rep = mysqli_query($db, $req);
while ($row = mysqli_fetch_array($rep)) {
    echo "<option value=".$row['id']." class=".$row['id_grande'].">".$row['libelle']."";
}
?>
</select></p>


<p style="display:none;">Remise de la sous cat&eacute;gorie : <br /><input type="text" size="30" name="remise_sous" value="<?php
echo $remise_sous; ?>" /></p>


<input type="hidden" name="id_news" value="<?php echo $id_news;
?>" /><br />

<input type="hidden" name="tabl" value="<?php echo $tabl;
?>" /><br />


<input type="hidden" name="date" value="<?php echo date("Y/m/d"); 
?>" />

<input type="submit" name="envoyer" value="Envoyer" />
</p>
</form>
