[PHP] New to PHP - Undefined variable: ??????
I'm new to PHP and can't get through my first script. I want to create a form that will allow the user to attach a file. I started with the file upload part of the form thinking that it ould give me the most problem, and it has. This is the error message that shows when I view the page in the browser: Warning: Undefined variable: File in D:\inetpub\thegospellady\www\kia\form.php on line 8 here is the url to the form: http://www.thegospellady.com/kia/form.php Please help. \n"); print ("File size: $File_size\n"); if(copy($File, "/users/$File_name")) { print ("Your file was successfully uploaded!\n"); } else { print ("Your file could not be copied.\n"); } unlink($File); } print ("Upload a file to the server:\n"); print ("\n"); print ("File \n"); print ("\n"); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie - still working on my first script.
I got the file to upload to my folder. But when I go to download it to my PC using FTP, it tells me NO SUCH FILE, but I can see it in the folder. The folder has read, write, execute permissions. I included the script below. I would appreciate any help. Advertisement Application \n"); print ("File size: $File_size\n"); if(copy ($File, "ads/ $File_name")) { print ("Your file was successfully uploaded!\n"); } else { print ("Your file could not be copied.\n"); } unlink ($File); } print ("Upload a file to the server:\n"); print ("\n"); print ("File \n"); print ("\n"); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php