Jump to content

Different behavior between desktop and BlackBerry


hadoob024

Recommended Posts

I can't seem to figure this one out. On my site, I have a real estate listing form. One of the fields is for the user to be able to upload a picture. Now, when I access this page on my PC at home, I have no problems. The error handling and security checks work fine. Regardless of whether I input info for this picture field, the form processor works.

However, whenever I try and submit this form using a BlackBerry, I keep getting the following error message:
"Error Message: Undefined index: picture"


And apparently this line of code is the culprit:
PHP Code:
[code]if (($_FILES['picture']['size'] != 0) && ($_FILES['picture']['tmp_name'] != ''))[/code]



I just can't figure out why this works perfectly on my PC, but causes an error on my BlackBerry. Any thoughts?
Good call! I think the BlackBerry just doesn't send $_POST stuff properly.  Like if a field isn't filled out, I think it might just not be adding it to the $_POST array (instead of just assigning a NULL value).  I added

(isset($_FILES['picture']))

to my "if" statement, and this solved the problem! Sweet! It works on the BlackBerry now. Thanks everyone!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.