Page 1 of 1

Can you show me how to add 1 field to a php download script?

Posted: Thu Dec 16, 2004 11:22 am
by 3z3k3l
Hey guys,

I am trying to figure out how to add 1 field to this script:

Hey I was just wondering if it was possible to add 1 field on the UpDownload module.

I need to add a "Price" field.

Currently it has:
Author's name :
Author's e-mail :
Version :
Homepage :

I want to add:
Author's name :
Author's e-mail :
Version :
Price:
Homepage :

Here is what the application looks like in action:
http://www.pbxinfo.com/modules.php?op=m ... file=index

I don't know php at all but I am not shy about trying,
Here is what I think I need to do, you guys tell me where I am wrong.

1. I need to create 1 more table or row.. in the database (mysql) to house this varible
2. Need to change in the dl-adddownload.php link to include "Price"
3. Need to change the Output of the template to include the price in the listings.

So I looked into the dl-adddownload.php file and found this:

Code: Select all

Code:
list($title,
         $nname,
         $cat,
         $description,
         $name,
         $email,
         $filesize,
         $version,
         $homepage) = pnVarCleanFromInput('title',
                                          'nname',
                                          'cat',
                                          'description',
                                          'name',
                                          'email',
                                          'filesize',
                                          'version',
                                          'homepage');

Am I headed in the right direction?
Here are the files if anyone can have a look.

http://www.pbxinfo.com/UpDownload.zip

You will be helping me with my first PHP hack ever, thank you!