I have a gallery page that I want the users to be able to upload images to. This is the code I am using, but for one the path that is put into my database is E:\domains\WSWebSiteimages/img_picture122.jpg. I tried turning aroung the slash the other way, but then it didn't even show up. Also, I can't get the image to copy into the folder on the webserver, I can' t get it to copy anywhere. I am using PHP 4 with the gd library enabled (in case that matters) on Windows 2000 running iis 5. Any suggestions would be welcomed.
E
$sql = "INSERT INTO gallery (calid,gdate) VALUES ('$calid','$gdate')";
$result = mysql_query($sql);
$gid=mysql_insert_id();
$filename = $DOCUMENT_ROOT.'images/img_picture1'.mysql_insert_id().'.jpg';
$sql2 = "Update gallery set picture1 = '$filename' where gid=$gid";
$result2 = mysql_query($sql2);
move_uploaded_file($HTTP_POST_FILES["file"]['tmp_name'],$filename);
print "You have added $gdate $title to the gallery page, your gallery will wait in que until it has been published by the editor.";
?>