Hi, I am trying to do an upload script for the first time and am struggling. I have created a folder on the root called bandpics. This is the full path:
home/kyle/www/bandpics
I also have a variable stored called $bandName, and I want to name the pic that variable when it is inserted into the folder. So if
$bandName = Turdz, I want the pic to be called Turdz.jpeg or whatever the extension is.
I am pretty lost by the tutes I have found so far. Heres what I have: (the input file field name is "image")
if($FILES['image'][tmp_name'] != "none"){
copy ($FILES['image']['tmp_name'], "/home/kyle/www/bandpics/".$_FILES['imagefile']['$bandName']);
or die ("Could not copy");
Thanks for ANY input on this.