move_uploaded_file returning true but not working

From: Date: Thu, 04 Apr 2002 01:08:53 +0000
Subject: move_uploaded_file returning true but not working
Groups: php.general 
Request: Send a blank email to php-general+get-91449@lists.php.net to get a copy of this message
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"; }

« previous php.general (#91449) next »