Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image upload to server directory with reference in mysql column

Status
Not open for further replies.

admundsen

IS-IT--Management
Joined
Feb 18, 2004
Messages
1
Location
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top