Code :
include('connexion_bdd.php');
$re1 = 'SELECT titre FROM prochaines_ventes ORDER BY date DESC';
$re2 = mysql_query($re1) or die(mysql_error());
echo '<div id="nouvelle_vente">
<div id="formulaire_nouvelle_vente">
<form method="post" action="" enctype="multipart/form-data">
<br/><h2>1) Choix de la vente</h2>';
echo '<select style="width:565px;" name="affichage_ventes" id="affichage_ventes">', "\n";
while($ligne = mysql_fetch_array($re2))
{
echo '<option value="'.$ligne['titre'].'">'.$ligne['titre'].'</option>', "\n";
}
echo '</select>', "\n";
echo $_POST['affichage_ventes'];
if(isset($_FILES['file'])){
$file_name = $_FILES['file']['name'];
$file_size =$_FILES['file']['size'];
$file_tmp =$_FILES['file']['tmp_name'];
$file_type=$_FILES['file']['type'];
$extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
$desired_dir="images_prochaines_ventes";
$path = "www.zzz.com/";
$lien_article = '"'.$path.'/'.$desired_dir.'/'.$file_name;
$lienVrai = addslashes($lien_article);
move_uploaded_file($file_tmp,"".$desired_dir."/".$file_name);
echo $r ='UPDATE prochaines_ventes SET pdf_prochaine_vente = "'.$lienVrai.'" WHERE titre = "'.$_POST['affichage_ventes'].'"';
$r1 = @mysql_query($r) or die(mysql_error());
echo "<br /><br /><center><spans style='color:green; font-size:18px;'>La vente et l'mages ont bien été envoyées</span></center>";
}
echo'<h2>2) Importer un fichier PDF</h2>
<input name="file" type="file" id="file"/><br/><br/><br/>
<input type="submit" value="Valider" style="width:150px; height:30px;" class="btn btn-primary"/><br/><br/><br/><br/>
</form>';
echo '</div>
</div>';