I need to store images of employees in a database. Can, how is this be done within MySql and PHP? I only need 2 fields, the id and image. Anybody know where I can perhaps get some reading material on this? Thanks a lot as always!
Storing images on MySQL?
I think the way most people store images is to upload the image to a separate directory and then store the url to the image in the database. (The alternative is to store in a blob field in mysql). If you have an employee id already, then just upload the picture to /images/employee99.jpeg or whatever, then create a new field in the employee table and store the location of the picture. Then on your web site just retrieve the location from mysql and put <img src="$image_location">. That would be the easiest way.
I have three scripts to do so. Send me an email to victorponz@terra.es and I'll send you the scripts.
Bye