So like this...
echo '<input type="checkbox" name="archive[]" value=".$row['file_id']." />';
Cheers.
I want to send a file into its relevant database table - based on whatever checkbox is selected.
So if all 4 checkboxes are selected, 4 different files are inserted into 4 different tables.
e.g. If checkbox 'A' is selected, file 'A' will be inserted into table 'A'
Here is my query...
$query = "INSERT INTO tableA(name, type, size, content, file_date) SELECT name, type, size, content, file_date FROM files WHERE CURDATE() >= DATE_ADD(file_date, INTERVAL 1 DAY)";
$result = mysql_query($query) or die(mysql_error());
Is there any easier way to process each file into its relevant table without repeating the query for each table?
thanks,
Kevin.