Okay, lets do this bit by bit. I know I can easily get the right data onto MySQL, but for now it's just a basic upload that's losing me - here's a script I downloaded but doesn't work on my server:
uploadform.html
<html>
<head>
<title>File Upload Form</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Upload Form</p>
<form name="form1" method="post" action="upload.php" enctype="multipart/form-data">
<p>File to be uploaded.
<input type="file" name="file">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<p> </p>
</body>
</html>
upload.php
<?php
$path_to_upload_dir = "g:\inetpub\wwwroot\futureinnovation";
if($file){
print("File name: $file_name<P>/n");
print("File size: $file_size bytes<P>/n");
if(copy($file, "$path/$filename")){
print("Your File was uploaded successfully");
}else{
print("ERROR, your file was not successfully uploaded");
}
unlink($file);
}
?>
I get the error:
Notice: Undefined variable: file in g:\inetpub\wwwroot\futureinnovation\upload.php on line 5
...which is
if($file){
... I don't have any experience with hand coding PHP yet and so basic troubleshooting is impossible. Your help is seriously appreciated!