Hello. I have problem with my php upload function. It looks like this:
PHP Code:
$target_path1 = "products/pdf/"; $target_path1 = $target_path1 . basename($_FILES['pdf']['name']); if(move_uploaded_file($_FILES['pdf']['tmp_name'], $target_path1)) { echo "The file ". basename($_FILES['pdf']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!";
HTML code looks like this:
PHP Code:
<input name="pdf" type="file" />
When i submit form with this field, i get this error:
Notice: Undefined index: pdf on line 14
Notice: Undefined index: pdf on line 15
Notice: Undefined index: pdf on line 20
I don't know what is problem. Could you help me, please.
|