hi all,
i have problems to pass a file and filename to the target page.
for ($i=0; $i<$Files; $i++){
?>
<p>
<input type="file" name="picture[]">
Name
<input type="text" name="filename[]">
</p>
<?
}
target page should reviece file and filename and create a file.
is it possible to check in a for loop for two arrays? wanna do all in one way.
else {
foreach ($filename, $picture as $key => $val) {
if($val !="") {
$return = mysql_query("INSERT INTO files (ID,filename,file) VALUES('$currID','$val','$picture_name')", $link);
if ($return == false) {
Error("Die Dateien konnten nicht übertragen werden.<br>".mysql_error());
}
// picture:
if (($picture != "none") and ($err == false)) {
// move picture
if (!copy($picture, "images/$picture_name")) {
Error("Datei konnte nicht kopiert werden.");
}
}
}
}
}
greets,
chris