I have next code :
which works great on other pages. But not on this
<tr><td>Upload Terms and Condition <br />(pdf, doc, docx, xls, txt)</td>
<td><input type = "file" name = "termspdf" id = "termspdf"/></td>
</tr>
and next code is :
// PDF SECTION ...
if (is_uploaded_file($_FILES['termspdf']['tmp_name'])) {
$pdf = $_FILES["termspdf"]["name"];
$pdfSize = $_FILES["termspdf"]["size"];
if ($_FILES['termspdf']['type'] != "application/pdf") {
echo $lang['var464'];
} else {
$path="images/products/pdf/";
$newPdf = time().".pdf";
$newPDFPath=$path.$newPdf;
$result = move_uploaded_file($_FILES['termspdf']['tmp_name'], $newPDFPath);
chmod($newPDFPath, 0777);
}
}
Array
(
)
Notice: Undefined index: termspdf in
/home/user678/public_html/users/_edit.php on line 25
I get any result. What can be wrong?
print "<pre>";
print_r($_FILES);
print "</pre>";
nothing ..
Thank you
Your form is probably not a multipart form: