Upload and Store Image File in Database using PHP and MySQL

preview_player
Показать описание
Form Features

1. Responsive design

• Your website will adapt to any screen size so it's as easy to use on mobile as it is on tablet and desktop.

2. Form validation

• Required field - display warning/alert messages if the field is left blank
• Only alphabets and numbers are allowed on 'Location'
• Display remaining characters of text area on 'Description'

3. Image uploading

• Only jpg and jpeg files are allowed
• Limit to just 1 image file on each upload field, far image or near image

4. Resize uploaded image (HD) - to save space in server and reduce loading time

• 2 new images will be generated - in portrait/landscape view
I. normal width 800px
II. thumbnail width 150px

• 2 new images (for each input) will be generated, renamed and 'meaningful' to the viewers, ie,

Type of image:
f = far image
n = near image

Date and time when the image is uploaded:

20220520 = date with digits = yyyymmdd = 2022 May 20
160802 = time with digits = hhmmss = 16:08:02 pm

Random numbers:
212 = random numbers between 0 and 999

5. Display form values after clicking 'Submit' button

6. Auto-filled current date and time in database, ie, 2022-05-20 15:58:34 = yyyy-mm-dd hh:mm:ss

7. Auto-filled date with digits, ie, 20220520 = yyyymmdd = 2022 May 20

8. Insert data into database
Рекомендации по теме
welcome to shbcf.ru