I run a site where users can, among other things, adopt virtual pets. I have several admisistrators on the site, and I am trying to create a thing that adds a new pet species through the administrator control panel without me having to ftp it. It takes four files: red happy, red sad, blue happy, and blue sad. Move_uploaded_file returns true on all 4, but doesn't seem to be uploading. Here is my code: if($HTTP_POST_FILES['redhappy']['type'] != "image/gif"){ print "<b>Error:</b> picture not a gif image"; eval($footertext); exit; } if($HTTP_POST_FILES['redsad']['type'] != "image/gif"){ print "<b>Error:</b> picture not a gif image"; eval($footertext); exit; } if($HTTP_POST_FILES['bluehappy']['type'] != "image/gif"){ print "<b>Error:</b> picture not a gif image"; eval($footertext); exit; } if($HTTP_POST_FILES['bluesad']['type'] != "image/gif"){ print "<b>Error:</b> picture not a gif image"; eval($footertext); exit; } if((move_uploaded_file($HTTP_POST_FILES['redhappy']['tmp_name'], "/hsphere/local/home/ecritter/ecritters.biz/images/$speciesname_red_happy.gi f")) && (move_uploaded_file($HTTP_POST_FILES['redsad']['tmp_name'], "/hsphere/local/home/ecritter/ecritters.biz/images/$speciesname_red_sad.gif" )) && (move_uploaded_file($HTTP_POST_FILES['bluehappy']['tmp_name'], "/hsphere/local/home/ecritter/ecritters.biz/images/$speciesname_blue_happy.g if")) && (move_uploaded_file($HTTP_POST_FILES['bluesad']['tmp_name'], "/hsphere/local/home/ecritter/ecritters.biz/images/$speciesname_blue_sad.gif "))){ mysql_query("insert into species(name) values('$speciesname')"); }else{ print "Unable to upload"; }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php