Re: forms and files
| From: | Jason Wong | Date: | Tue, 02 Jul 2002 15:45:56 +0000 |
| Subject: | Re: forms and files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104942@lists.php.net to get a copy of this message | ||
On Tuesday 02 July 2002 23:34, Tyler Longren wrote:
> Hi,
>
> I have a form kinda like this:
> <form action=$PHP_SELF?option=Mass&action=add method=POST
> enctype=multipart/form-data>
> <input type=file name=passcodeFile>
You really should use "" around your tag values. What you have is invalid
HTML.
> the rest of the form is there too. And $PHP_SELF is set to $PHP_SELF =
> $_SERVER[PHP_SELF] at the top of the page.
>
> When I select a passcodeFile file to upload and click the "upload"
> button, I am presented with this on the next page:
> "You need to specify a file to use."
>
> Here's what I did:
> if ($_POST[passcodeFile] == "") {
> print "You need to specify a file to use.";
> }
>
> Any ideas why it does that even if I do select a file?
1) print_r($_POST) to see what you have, while you're at it, do the same for
$_FILES.
2) Use the example(s) in the manual, once you have them working modify to
suit.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Nature always sides with the hidden flaw.
*/