hi all,
need help with a loop.
this inputfield is generated on the first page.
for ($i=0; $i<$Files; $i++){
?>
<p>
<input type="file" name="files">
<font face="Arial, Helvetica, sans-serif" size="2">Name</font>
<input type="text" name="filename[]">
</p>
<?
}
the target page after submit should count the inputs who are not null and insert then the path in the table and move the files to a dir.
my problem is that the values are inserted as "array" in the table - i want the value inserted. knows somebody how that works?
would be very apprecheatet for help!
foreach ($filename as $key ) {
$value = $filename[$key];
print $value;
if( $key != "") {
$return = mysql_query("INSERT INTO files (ID,filename) VALUES('$currID','$value')", $link);
}
}
greets,
chris