0

Hi there, I have a website that i need to have a user submit some information and upload 2 files. And add the information to the database. what is the best way to do this. Any and all help would be apprechiated. This is a not for profit site. I need to collect the following information.

Name first and last
Age
Address
city
state
zip
How long they have smoked
Have they ever tried to quit
ever use a E-cigerette
And allow them to upload Copy of license and medical note.
Needs to save to database.
I need to be able to check database for name and address to be sure that they havent submitted before
Be able to return them to page if there is a error or previously used name or address.
have script protect from injections, and invalid characters ect.
Send a notice that there submission was recieved to them.
Send a notice that there was a submission recieved to us.

the site is stopsmokinamerica.com
Any help you could provide would be awesome.

Edited by JulieR31392: added url

2
Contributors
1
Reply
22
Views
3 Years
Discussion Span
Last Post by Banderson
0

This is how I would do this. Create a form to add everything including the upload for the license and note. Choose what type of formats you want to allow also. (eg: pdf, png, jpg, rtf etc....)

Add the form fields to the database and upload the license and note to a protected folder on your server. Name the uploaded file first name_last name_state_some_random string or numbers and use this path in the database field.

You could also create a folder for that user on the fly with a random unique name and number and use that in your database for the file path.

This is just my opinion. I personally like directory structures for images and files instead of using a database. The less calls to a database the better.

Edited by Banderson

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.