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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.