i am working on a project which has user profile and need to upload an avatar. i have no idea on how to code using php the upload avatar function. any idea?
any help would be appreciated! tnx
helpless_101 0 Newbie Poster
Recommended Answers
Jump to Posti don't think its as easy as you think mate...
On the html you need to add this:
<input type="file" name="uploadFile">And on the page that checks and stores everything int he database you'll need to add AT LEAST this:
…move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'], "../uploads/{$_FILES['uploadFile'] ['name']}")
All 8 Replies
kevindougans 2 Junior Poster
helpless_101 0 Newbie Poster
kevindougans 2 Junior Poster
Shanti C 106 Posting Virtuoso
R0bb0b 344 Posting Shark
mexabet 49 Good Learner
helpless_101 0 Newbie Poster
helpless_101 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.