First of all a little "how to" info.
Normal form elements (with the post method), textarea, checkboxes, text inputs, etc. should be referenced using:
$_POST['the_name_of_the_in
The file input is a little different. On the server side you have an array called the $_FILES array. This contains all of the relevant information about the uploaded file. For example, if your file input was called "myfile":
$_FILES['myfile']['name'];
would have the original filename assigned to it.
The PHP manual page for handling file uploads will tell you everything you need to know regarding how to handle the process:
http://us3.php.net/manual/
Make sure your form tag includes: enctype="multipart/form-da
For example. instead of:
if ($file_html != "") {
$filenamehtml = "$time".'.html';
@copy("$file_html", "./upload/html/$filenameht
or die("Couldn't copy the file.");
$file_html = '/upload/html/'."$filename
}
you would use something like:
if (!empty($_FILES['file_html
$filenamehtml = "$time.html";
if (move_uploaded_file($_FILE
echo "Done";
}
else {
echo "Could not upload";
}
}
And if $sector, $category etc are being populated from the POST array you would instead use:
$sector = addslashes($_POST['sector'
Diablo84
Main Topics
Browse All Topics





by: JCGreylingPosted on 2005-04-26 at 03:37:15ID: 13865527
I do include the variables