473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to store profile Images?

55
If a user on my website wants to add a image to his profile and store it there, what PHP (combined with MySQL) could be used to store the image and keep it displayed as his profile picture?
Mar 21 '11 #1
4 1850
dlite922
1,584 Expert 1GB
The user table neesd to have a blob column where you will store the image in raw byte and if you accept multiple mime types, maybe store the mime type in another table.

Or the not so recommended way:

You can store the image on a pub dir such as /users/imgages/xxx.jpg, where xxx is the unique user's ID.

Cheers,


Dan
Mar 21 '11 #2
neogazz
55
I don't understand what you mean, could you please explain in more detail? Sorry I am new to PHP...
Mar 21 '11 #3
dlite922
1,584 Expert 1GB
You've provided little information regarding your current website, that's as detailed as I can go.

I suggest researching key terms: MySQL Tables and Blob, Insert images into MySQL with PHP.

This forum is for answers for specific questions, we can't help you write the entire code. It takes years to learn PHP fully, It's best to start at some point.

w3cschools.org is a good website. There are lots of PHP books and resources online.

Ask a specific question and I'll gladly answer it,


Dan
Mar 22 '11 #4
neogazz
55
No problem, thanks for the advice...have a great day :)
Mar 22 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ScottYoder | last post by:
Is there a way to convert an image pointer to a page ID that could be used in DBCC page i.e. select TEXTPTR(document)FROM testdocs where id = 1 resturns 0xFEFF3601000000000800000003000000 ...
1
by: Belinda | last post by:
Can you please help me with an Access 2000 matter; I want to produce a simple database, which will store images and associated text such as the image name. You would add the images by...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
0
by: ProgGuru | last post by:
Hi, I have a problem in the Image storing and retrieving at SQL Server 2005, my code is: ----------------------------------------------------------------------------- for storing: Image...
3
by: Bama | last post by:
I already stored the image in the SQL database. How do I retrieve it? Any help is appreciated.
2
by: banumathi | last post by:
How to store image in Data Base
1
devonknows
by: devonknows | last post by:
Can any guide me towards storing my images into a .DAT file, or any tutorial links i can find sites for other languages just not for visual basic, if any body can point me at some links or give me...
8
by: brahmaforces | last post by:
Hi Folks, I am using cherrypy and python. I am trying to get a user profile image to resize on the client side before uploading to the server. PHP has a gd library that does it it seems. Has...
2
by: Geunther | last post by:
I have a project that needs to store images from an excel worksheet to a SQL database. I only have VBA as a tool to accomplish this. I have code to identify all the images on the worksheet that are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.