NEED HELP CREATING A DATABASE THAT CAN STORE CERTIFICATES AND RETRIEVED

Hi I totally new at this and learning as i go.

Im busy creating a website that will be a place to where people can 1. store certificates so that other can search for them and verify. One example is this site www.bbbeescorecards.co.za.

Please i really need help

Normal procedure would be to upload the file(s) to the server, then add the location/file names to the database.

Basically:

user uploads pdf1.pdf and pdf2.pdf

files are stored in
/server/uploads/30a0afad45f674dd833c80e2edbdddc4/pdf1.pdf
/server/uploads/30a0afad45f674dd833c80e2edbdddc4/pdf2.pdf
where the hash (30a0afad45f674dd833c80e2edbdddc4) is a hash of the user

or you can store them (probably best if a user may upload files with the same name)
/server/uploads/pdf1_07ae6f4b9ce33aa04bb86680f3ab8342.pdf
/server/uploads/pdf2_585fe0da4effee4b3937d8595cc33ae1.pdf
where the hash is a hash of the actual file. so if they upload a new file with the same name it will be stored with a different file name on the server.

Then add the filename to the database.
INSERT INTO files (filename_virtual, filename_original) VALUES (‘pdf1_07ae6f4b9ce33aa04bb86680f3ab8342.pdf’, ‘pdf1.pdf’), (‘pdf2_585fe0da4effee4b3937d8595cc33ae1.pdf’, ‘pdf2.pdf’)

You might want to add user_id / owner_id and verified columns

Let us know if there is anything you need help with :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service