Hi,
I am having trouble uploading images to a directory on a server with a corresponding reference in my mysql table column.
Am using the following code to move the file:
####################
if( strlen( $userfile ) > 1 ) {
$hasAnImage = 1;
$imageType = strstr( $_FILES['userfile' ['name'], '.' );
$NicknameImage = $Nickname . $imageType;
move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $userImageDir .'/'. $NicknameImage);
}
##################
my table column is 'image TINYINT(1)'.
Any suggestions on perhaps a more trivual/different approach would be most welcome.
Cheers.
I am having trouble uploading images to a directory on a server with a corresponding reference in my mysql table column.
Am using the following code to move the file:
####################
if( strlen( $userfile ) > 1 ) {
$hasAnImage = 1;
$imageType = strstr( $_FILES['userfile' ['name'], '.' );
$NicknameImage = $Nickname . $imageType;
move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $userImageDir .'/'. $NicknameImage);
}
##################
my table column is 'image TINYINT(1)'.
Any suggestions on perhaps a more trivual/different approach would be most welcome.
Cheers.