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 ("<p id='message'>Image and Bio has been successfully stored.</p> ");
} else {
echo ("<p id='message'>Image could not be stored.</p>");
}

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to