Hi!
I want to add the posibility for me to write the name of who took the picture I'm uploading.
I added a input in the admin area like this:
And in classes.php i edited this:
query("INSERT INTO ".prefix("images")." (albumid, filename, title, forfatter) " .
"VALUES ('".mysql_escape_string($this->album->albumid).
"', '".mysql_escape_string($filename).
"', '".mysql_escape_string($this->meta['title'])."', '".$forfatter."');");
Notice the $forfatter part. Forfatter is norwegian for author.
I also made a new part in the image in the database called forfatter.
The problem is that I cant get the information i write in the input to be saved in the database. I also tried $_POST['forfatter'] but it didnt work.
Help!
You also have to look at the POST-form handling logic at the top of admin.php, which is where the save functions are actually called for the upload. Take a look at those save methods in classes.php; you'll have to make a new one and call it when the author is updated. Ideally, you'll also want to edit it later, so look at the admin edit page and add a field there as well.
It's more complicated than just those few lines you've shown us... take a look at how the upload form is handled and maybe you'll see how to do it...