bonjour
j ai deja signale mon proble a propos de recuperer le chemin des fotos telecharge via formulaire
je met ce script , peut etre vous pouvez trouver une solution
<html>
<head>
<title>Upload File To MySQL Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.box {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
border: 1px solid #000000;
}
-->
</style>
<link href="../../CSS/Level3_1.css" rel="stylesheet" type="text/css">
</head>
<?
// you can change this to any directory you want
// as long as php can write to it
$uploadDir = '../../images/fotodatabase/';
if(isset($_POST['upload']))
{
for ($i=0; $i < count($_FILES['userfile']['tmp_name']); $i++) {
$fileName = $_FILES['userfile']['name'][$i];
$tmpName = $_FILES['userfile']['tmp_name'][$i];
$fileSize = $_FILES['userfile']['size'][$i];
$fileType = $_FILES['userfile']['type'][$i];
// the files will be saved in filePath
$filePath = $uploadDir . $fileName;
// move the files to the specified directory
// if the upload directory is not writable or
// something else went wrong $result will be false
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
$filePath = addslashes($filePath);
}
echo "
File uploaded
$filePath
";
}
}
?>
<form action="" method="post" enctype="multipart/form-data" name="uploadform">
<table width="350" border="0" cellpadding="1" cellspacing="1" class="box">
----
, </td>
,
----
,
,
----
,
,
----
,
,
</form>
</html>
merci
</td>
</tr>
</tbody>
</table>