/    Sign up×
Community /Pin to ProfileBookmark

using enctype="multipart/form-data"

Hi, i am using enctype=”multipart/form-data” as i need to upload a file.

I have come accross a small problem, i am doin some error check and im now gettin a false result as im using enctype=”multipart/form-data” coz when i take it away its fine. I am check to make sure all fields are field out and i am using this code

This on the link file

[code=php]
function filled_out($form_vars)
{
foreach ($form_vars as $key => $value)
{
if ($value == ”)
return false;
}
return true;
}
[/code]

and im using this to call the function

[code=php]
//check to see if it is filled out
if (!filled_out($HTTP_POST_VARS)) {
echo “not filled out”;

//if it is all filled out
} else {
[/code]

Please bare in mind this works when i take out the enctype

any ideas ?

Cheers adam

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@AdamBrillAug 30.2004 — My guess is that something is wrong with the form, but without seeing it, it is impossible to tell...
×

Success!

Help @k0r54 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...