Jump to content

Picture in database


xionhack

Recommended Posts

Hello. I have a database with a table called "member_info" in that table is all the info about the member. I want to be able to display with the name of the member, their picture. I just dont know how to save the pictures in the database or how should I do the process of updating or inserting pictures for new members. Can somebody help me? It's the first time that I work with php/mysql and pictures. Thanks!

Link to comment
https://forums.phpfreaks.com/topic/145031-picture-in-database/
Share on other sites

It is probably a better idea to not store the images in your database. Assuming that each member will have one picture and that your database table for members each have a unique id...then you can store the pictures on the file system and have the pictures named with their id.(ext)

Link to comment
https://forums.phpfreaks.com/topic/145031-picture-in-database/#findComment-761024
Share on other sites

When you upload a photo (go to the database) and grab that users unique id ( we will use this when renaming the picture ).

 

Do you have the upload functionality working yet?

 

With this function----->

move_uploaded_file ( string $filename , string $destination )

 

See----> http://us3.php.net/manual/en/function.move-uploaded-file.php for help you can rename the file as part of the destination string using that members unique id that you grabbed from the database.

Link to comment
https://forums.phpfreaks.com/topic/145031-picture-in-database/#findComment-761029
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.