1
phillipd
$_FILES is empty
  • 2005/2/23 19:31

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I'm using XoopsFormFile in a "form" to get a filename into $_FILES in my recieving script. I'm doing it in EXACTLY the same manner as wfdownloads does it. But in my recieving script, which is the same as the form script, $_FILES is empty. My code snippet:

$darform = new XoopsThemeForm("", "darentryform", "addedit.php");

$darform->addElement(new XoopsFormFile('Attachment', 'userfile',0));
add submit button here...
$darform->display();


Recieving script:

global $_FILES;
if (empty($_FILES['userfile']['name'])) {
echo "FILES is empty...<br>";
}

Any help is greatly appreciated...

Doug P

2
Mithrandir
Re: $_FILES is empty

add
$darform->setExtra('enctype="multipart/form-data"');

before display

3
phillipd
Re: $_FILES is empty
  • 2005/2/23 19:48

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


Once again you pull my fat out of the fire.

Thankyou VERY much!

Doug P

Login

Who's Online

175 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 175


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits