I want to upload and store images in MySQL database, but have no idea.

Please help me out?

Thank you

You don't, well technically you can, but there's a better way in my mind to store avatars. Simply upload them to a writeable directory (and be sure to check their name for validity: ensure to remove and null characters) and rename them to the user's name. You can also rewrite the writeable directory so that the URL to access a user's picture.

If you absolutely insist on storing an image in a MySQL database, check out this tutorial on PhpRiot.

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.