Jump to content

Image gallery for registered members


Kay009

Recommended Posts

Since i have recently started working on php and i am basically following tutorials to achieve functionality.

 

I need help with image uploader.The image uploader allows registered users to upload/delete multiple images And atleast one of the uploaded img of registered member goes to his/her profile.

 

Can someone assist and tell in detail how this can be achieved.I have found a couple of tutorials which let me upload images but how do i customize it for members only so only they are able to delete them.

 

i

Link to comment
https://forums.phpfreaks.com/topic/179940-image-gallery-for-registered-members/
Share on other sites

Well, first you need a user-management system. You also need some way to store the data (either a MySQL, Postgres, Oracle database, or a flat-file database).

 

What you need to store in the database

1) The usernames, passwords, and anything else you want them to register.

2) The uploader of the image, the name of the uploaded image, and the location (if you choose to store images in different directories as opposed to storing them all in just one.

 

Do you have access to any kind of SQL-database?

Okay, so you have to create a table in MySQL.

 

Make one table for users and put in the following fields:

field-name: userid -- this INT-type field will be auto-incremented and will have a length of 11 and will be a primary-key

field-name: username -- this VARCHAR-type field will have a length of X characters (you can decide what X is) and will be an index-key

field-name: password -- this  VARCHAR-type field will have a length of 32 characters and will be an index-key

Okay, so you have to create a table in MySQL.

 

Make one table for users and put in the following fields:

field-name: userid -- this INT-type field will be auto-incremented and will have a length of 11 and will be a primary-key

field-name: username -- this VARCHAR-type field will have a length of X characters (you can decide what X is) and will be an index-key

field-name: password -- this  VARCHAR-type field will have a length of 32 characters and will be an index-key

I have done this far.Users are able to register and login to my Webpage.

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.