Re: QuickForm and files.
| From: | Alexey Borzov | Date: | Tue, 04 Nov 2003 08:06:43 +0000 |
| Subject: | Re: QuickForm and files. | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8748@lists.php.net to get a copy of this message | ||
Hi!
Ian P. Christian wrote:
Just so that I know if I'm doing it in the 'best' way, can anyone comment on this code snippit? (the form processing stuff will be moved into the form class when it's finished). This code does work, I just want to ensure that I'm using the class as intended!
...
if ($form->isUploadedFile('fileImage'))
{
$fileImage = $form->getElement('fileImage');
$fileInfo = $fileImage->getValue();
...
isUploadedFile() in HTML_QuickForm is deprecated, too. You should do:
$fileImage = $form->getElement('fileImage');
if ($fileImage->isUploadedFile())
{
$fileInfo = $fileImage->getValue();and so on. Other than this, looks OK.