Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Uploading a file and storing the file name in the database

phpMyEdit Configuration     Uploading a file and storing the file name in the database
Odoslať novú tému   Odpovedať na tému    
 
bp     Založený: 03.04.2009   Príspevky: 4  
Príspevok Zaslal: 2009-04-14 06:32
Návrat hore  Odpovedať s citátom     

Hi all,

I have implemented the wichmann patch referenced at http://opensource.platon.sk/projects/bug_view_advanced_page.php?f_bug_id=29. This includes the uploader.php file that is also attached to that bug. I am having 2 problems, and I wonder if anyone has a suggestion on how to fix them.

1. My filename field is set up as follows:

$opts['fdd']['filename'] = array(
'name' => 'Filename',
'select' => 'T',
'maxlen' => 2048,
'sort' => true,
'input' => 'F',
'imagepath' => '/var/www/test/updates/'
);
As expected, a "browse" button shows up next to the "filename" field, it lets me choose a file, and it successfully uploads it. The problem is, it doesn't update the database with the filename. What am I missing?

2. Not as critical as the first problem, but when I am in the listing view and do a page refresh, it adds the records to the database again. Any ideas?

Thanks!

Ben

 
bp     Založený: 03.04.2009   Príspevky: 4  
Príspevok Zaslal: 2009-04-15 06:06
Návrat hore  Odpovedať s citátom     

I answered my own question. If this will help anyone, I put the following line in uploader.php after the file was successfully moved to a permanent location:

$newvals['filename'] = $fileName[$i];

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov