Forum Moderators: coopster

Message Too Old, No Replies

wrong parameter count?

         

adammc

2:33 am on Jul 1, 2006 (gmt 0)

10+ Year Member



Hi folks,

I cant seem to work out why I am getting this error:

Warning: Wrong parameter count for is_uploaded_file() in edit-product.php on line 85

[php]
if (is_uploaded_file($_FILES["picture"]['tmp_name'], $_FILES["thumb"]['tmp_name']))
{

// check that pictures were uploaded
$pic = uploadFile("picture");
if(! $picName)
{
die("Error uploading the picture");
}
$thumbName = uploadFile("thumb");
if(! $thumbName)
{
die("Error uploading the thumbnail");
}

[/php]

Any help would be GREATLY appreciated :)

eeek

3:51 am on Jul 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why are you passing two arguments when the function only uses one?

jatar_k

4:27 am on Jul 1, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if you are trying to test 2 pics then you will need to call the function twice

coopster

12:26 pm on Jul 1, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It may be a good time to refresh on How to read a function definition [php.net]. Understanding PHP's function use is critical for effective development.