<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>UPLOADE a FILE</title>
</head>
<body>
<h1 class="titre" align="center"> </h1>
<?php
//include('connex.php');
if(isset($_POST['submit']))
session_start();
// $u=$_SESSION["user"];
// echo $u;
$connexion=mysql_connect( "localhost","root","" )or die();
mysql_select_db('bdconf')or die(mysql_error());
if(isset($_FILES['fichier']))
{
$fichier=mysql_real_escape_string(htmlentities($_FILES['fichier']['name']));
$query=mysql_query("INSERT INTO article(idart,nom_art,nomauteur,nomrevewer,fichier,critere_evaluant) VALUES('','$nom_art',$nomauteur','$nomrevewer,$fichier','$critere_evaluant')")or die(mysql_error());
//$query=mysql_query("INSERT INTO article(idart,nom_art) VALUES('','pdf')")or die(mysql_error());
if($query==true)
{
move_uploaded_file($_FILES['fichier']['tmp_name'],'fichier/'.$fichier);
?>
<script>alert('votre fichier a correctement ete uploade');</script>
<?php
}else
{
}
}
?>
<script>alert('ERROR');</script>
<form id="maform" name="form1" method="post" action="article.php">
<form align="center" border="1">
<form methode="POST" action="" enctype="multipart/form-data">
<input type="file" name="fichier">
<input type="submit" value="Uploader">
</body>
</html>