Re: HTML_QuickForm_file and PEAR::DB
| From: | Justin Patrin | Date: | Sun, 05 Dec 2004 04:12:05 +0000 |
| Subject: | Re: HTML_QuickForm_file and PEAR::DB | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16014@lists.php.net to get a copy of this message | ||
On Sat, 4 Dec 2004 00:08:08 +0800, Muhyiddin A.M Hayat
<middink@indo.net.id> wrote:
> Dear All,
>
> How to using HTML_QuickForm_file and PEAR::DB using register_globals = Off ?
>
> I try to update blob field using HTML_QuickForm_file and PEAR::DB, my source:
>
> $form->addElement('file', 'filePicture','Picture ');
> $fields_values['foto'] = file_get_contents($filePicture);
>
> $db->autoExecute('person', $fields_values, DB_AUTOQUERY_UPDATE, 'id
> ='.$_POST['ID']);
>
> but, when i turn off register_globals that field are set to null, what type variable
> $filePicture $_POST or $_FILE or ......
You need to use $_FILES['filePicture']['tmpname'] I think. Check to
make sure on the PHP manual.
>
> Thanks
>
--
Justin Patrin