I have a form that should allow me to edit photos on a website.
<input type='file' name='file1' class='picinput' />
<input type='file' name='file2' class='picinput' />
Then i want to manage the files so i thought i should do an if/else loop :
<?
if(isset($_POST['file1'])) {
move_uploaded_file($_FILES['file1']['tmp_name'], $target1);
echo "File #1 uploaded";
}
else
{
echo "File #1 was not changed.";
}
?>
It seems like $POST['file1'] is never set ... i tried to print_r($POST['file1']) and it doesn't return anything.
What should i do so my loop will work ?
NOTE : The loop has more statements in it such as declaring variables that later get inserted in the sql db so that's why it's so important.