this is what i got.
$pic1 = $_POST['pic1'];//these 4 are hidden feilds that store the data of the file name when i call it to edit.
$pic2 = $_POST['pic2'];
$pic3 = $_POST['pic3'];
$pic4 = $_POST['pic4'];
if (!empty($_FILES['ipic1'])) { //ipic1 is the name up the upload feild if its not empty
$uploaddir = '/home/virtual/site30/fst/var/www/html/projects/';//this uploads to the dir
$uploadfile = $uploaddir . basename($_FILES['ipic1']['name']);
echo($_FILES['ipic1']['type']);
move_uploaded_file($_FILES['ipic1']['tmp_name'], $uploadfile);
$pic1 = $_FILES['ipic1']['name']; //this turns it to var pic1
}
else
$_FILES['ipic1'] == $pic1; // if it is empty it should pull this

New Topic/Question
Reply




MultiQuote



|