Hi... I am trying to create a function to simply upload a PDF to a website... with a preset name (no matter what the file is called... it will be called a specific name on the site.)
here is the code that recieves the form where the PDF is browsed to and sent..
if (@$uploadPDF <> ""){
if (is_uploaded_file($_FILES['UploadPDF']['tmp_name']))
{
//UPLOAD
$file_realname = $_FILES['UploadPDF']['name'];
//PUT IN FILDER
copy($_FILES['UploadPDF']['tmp_name'], "../editsuite/Products.pdf");
?><span class="mssgtext"> New brochure was successfuly uploaded </span><?php
}
else
{
echo "<span class='mssgtext'> <b><font color=red>No file uploaded.</font></b><BR>No file available or file too big to upload.</span>";
}
}
else
{
?><span class="mssgtext"> No File Was selected to upload. Try again. </span><?php
}
Every time I try this... with a pdf properly selected in the browse file tool, it seems to act as if the file was never uploaded to the server... I always get the "No file uploaded. No file available or file too big to upload." error message.
any ideas why?
thanks