Author Topic: Get a PHP script to run an insert data into database on upload  (Read 2931 times)

0 Members and 1 Guest are viewing this topic.

Offline plasticphyte

  • Newbie
  • *
  • Posts: 13
    • View Profile
Hi guys,

If this is the wrong section for this question, please feel free to move it..

I'm not a PHP programmer, I know just enough to do very basic modding - anyway, I have a very simple PHP script I'm trying to get to run when an image is uploaded, so that it inserts exif data into the image_description bit of the database as plain text.

The PHP I want to run is:
Code: [Select]
<?php  $filename "image_that_was_uploaded"; require("./templates/dark/exif.inc"); $er = new phpExifRW($filename); $er->processFile(); $er ->showImageInfo(); ?>

I would like it to insert the outcome of the script into the database field that stores the {image_description} so that when I use {image_description} in my template, it outputs the exif data.

(Hopefully that makes sense)

I'm aware that 4images can read and output EXIF data, but I would like to use this process as the data 4images retrieves isn't compatible with the lightbox js effect.

My version of 4images is 1.7.4
« Last Edit: June 27, 2008, 11:20:09 AM by plasticphyte »