Skip to main content
Participant
January 9, 2012
Question

creating a mysql database for uploading form and images

  • January 9, 2012
  • 2 replies
  • 780 views

i'm actually creating a database for an online form which i successfully did, but images doesnt upload. whenever i click submit it tells me the image field name i.e the image id name cannot be empty. i changed the property from not null to null and when i click submit, it goes successfully but doesnt upload the image into the databae.

This topic has been closed for replies.

2 replies

Participating Frequently
January 9, 2012

First of all, it's not a good idea to store the binary image file in the database as it can cause severe performance problems. Instead, upload the file to the server file system and just store the path/filename in the database. Are you sure that the current form script you are using even support file uploads?

Rob Hecker2
Legend
January 11, 2012

You CAN upload images to a database, but as Bregent pointed out, you should not.

PHP Solutions by David Powers contains chapters on uploading files, including images.

jahsweyAuthor
Participant
January 9, 2012

any  one who can help me with a guided step please i'll be grateful