this is the error message i have been fighting with: Undefined index: uploadFile.
My form file has this code to begin:
<form enctype=”multipart/form-data” action=”../php/modify_update.php” method=”post”>
<input type=”hidden” name=”MAX_FILE_SIZE” value=”2000000″ />
The actual form input part is this:
<td>Photo link:</td><td><?php echo $Photo_link ?></td><td class=”column3″>Select File:<input type=”file” name=”uploadFile” size=”40″><input type=”hidden” name=”MAX_FILE_SIZE” value=”25000″/></td>
My php file is this:
$target_path = “../plant_images/”;
$target_path2 = “../thumb_images”;
////////////////////////////////////////////////////////////////////////////
$target_path = $target_path . basename( $_FILES[‘uploadFile’][‘name’]);
//$target_path = $target_path . (basename(stripslashes( $
///////////////////////////////////////////////////////////////////////////////
$Photo_link = $target_path;
I’m getting the error message on the: $target_path = $target_path …..
What really confuses me is that when I do a variable dump I see that the ‘uploadFile is assigned. Here is my dump:
array(23) { [“P_ID”]=> string(4) “1281” [“Date”]=> string(10) “2014-12-18” [“old_Date”]=> string(10) “2014-12-18” [“Action”]=> string(7) “test18a” [“old_Action”]=> string(8) ” test 18″ [“Pot_Number”]=> string(3) “18a” [“old_Pot_Number”]=> string(2) “18” [“Plant_Family”]=> string(3) “18a” [“old_Plant_Family”]=> string(11) “Apocynaceae” [“Plant_genus”]=> string(3) “18a” [“old_Plant_genus”]=> string(7) “Adenium” [“Plant_species”]=> string(3) “18a” [“old_Plant_species”]=> string(2) “18” [“blossom_description”]=> string(3) “18a” [“old_blossom_description”]=> string(3) “18 ” [“plant_description”]=> string(3) “18a” [“old_plant_description”]=> string(0) “” [“Plant_Name”]=> string(3) “18a” [“old_Plant_Name”]=> string(2) “18” [“uploadFile”]=> string(23) “DSCN3745 (1024×768).jpg” [“MAX_FILE_SIZE”]=> string(5) “25000” [“old_Photo_link”]=> string(39) “../plant_images/DSCN3748 (1024×768).jpg” [“update”]=> string(13) “Update Record” } the target pathe is: ../plant_images/try again here is the photo link
As usual, I’m sure it’s just a dumb error, but I’m not able to see it.
Thanks for any help you can give me.