Ok first off I would like to say that I really know little about PHP. I am good at looking at code and figureing out what it does though. With that said I am trying to modify a PHP script and having a bit of trouble.

I will give a little history first

Ok this script uses a database as well. What it does is it gives you a page where you can add a file information, example : filename, version , author ect... I am using this script to keep track of my files. The script would be perfect on its own exept I am trying to add a feild to put the md5sum of the file so it will list that as well as all the other information. This is were I am running into trouble.

There are 3 files that I have been editing to do this.

One is called file.php and it is in the includes directory
One is called file.php and it is in the includes/admin directory
One is called language.php and that is in the language directory

file.php in the includes directory is the file that displays the final information after you submit it
file.php in the includes/admin directory is where you fill out and submit the information
language.php is the language file of course [ not having any trouble there but just thought I would give the complete list of files i altered.

So I take a look at the source of includes/file.php and see that for the field long discription it has a statment like this

PHP Code:
<tr><td width="20%" class="datacell"><?php echo $str[desc]; ?>:</td><td width="80%" class="datacell"><?php echo $file[file_longdesc]; ?></td></tr>
ok that tells me that to make the field long discription display the discription that was inputed from includes/admin/file.php you have to include the <?php echo $file[file_longdesc]; ?> .

Ok since I want to display md5sum this is what I added to make the field appear on that page

PHP Code:
<tr><td width="20%" class="datacell"><?php echo $str[md5sum]; ?>:</td><td width="80%" class="datacell"><?php echo $file[file_mdsum]; ?></td></tr>
Ok, upload it and the field is there, now I have to get the information from includes/admin/file.php to includes/file.php

So I take a look at that

I notice that for the long description line they have this

PHP Code:
<tr><td width="50%" align="right" class="datacell"><?php echo $str[fileld]; ?></td><td width="50%" align="left" class="datacell"><input type="text" class="forminput" size="50" name="form[longdesc]">
<a class="small"><?php echo $str[fileldinfo]; ?></td></tr>
Ok this tells me that they use "form[longdesc]" as the name so that if you remember from includes/file.php they added <?php echo $file[file_longdesc]; ?> ok but the one is saying form and the other is saying $file that didnt make sence to me untill i scrolled down and saw this

PHP Code:
$query .= "file_longdesc = '$form[longdesc]', "
ok that makes sence... this line tells us that '$form[longdesc]', "; is refered to with the statment
"file_longdesc ok good.. So this is what I do:

I add

PHP Code:
<tr><td width="50%" align="right" class="datacell"><?php echo $str[md5sum]; ?></td><td width="50%" align="left" class="datacell"><input type="text" class="forminput" size="50" name="form[mdsum]">
<a class="small"><?php echo $str[md5sumexplain]; ?></td></tr>
to make the feild to put the info in and then go down the script a bit and add

PHP Code:
$query .= "file_mdsum = '$form[mdsum]', "
along with the other $query feilds to I guess you would say declare it.

I then edited the language file to make all my $str statements work. Upload all this and refresh and its all there , a place to add the info and a place to display the final outcome of adding the info

So I add something to test it submit and to my dismay it is not including the md5sum the feild is just empty. Ok maybe my logic wrong, i screwed up somewhere . BUt then got the idea, ok the info is displaying for long discription and everything else but not md5sum. I edit the includes/admin/file.php to make the statement for the md5sum be <?php echo $file[file_longdesc]; ?> instead of <?php echo $file[file_mdsum]; ?> upload and refresh and now in the md5sum feild it displays a description... so my logic is right.

I dont understand why this dont work then. Because I added another feild do I have to add another table to the database you think so it has a place to store it or should the database be fine.

Any help would be appreciated