So did you intend for this to happen :
Set $dest="". Check source supplied. Set $dest=$uploadpath.$photo_name;
Check if $dest="". If $dest="" (which it cant be if you supplied an image),
then move the uploaded file (it will never run). Else, echo couldn't store
image.
You see the problem, yes ?
PS why do you check if ($source != '') twice ? Whats that all about ?
$source = $HTTP_POST_FILES['photo']['tmp_name'];
$photo_name = $HTTP_POST_FILES['photo']['name'];
$dest = '';
if (($source != '') && ($source != '')) {
$dest = $uploadpath.$photo_name;
if ($dest = '') {
if (move_uploaded_file($source, $dest)) {
echo ("Image and Bio has
been successfully stored. ");
} else {
echo ("Image could not be
stored.");
}
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php