[PHP] File Upload Issues
I was hoping to get a bit of help with a strange file upload issue that I am having. Below is a simple form that I am using as an example. The output from the $_FILES array follows that. The thing that I am unable to resolve is the fact that the file upload returns the name of the file the user is uploading, but will not give me the tmp_name or the type. I am having this problem with this form and another as part of an application I am working on, however, I have another form with 2 file upload fields that works normally. HTML FORM: form enctype=multipart/form-data action=test.php method=POST> input type=hidden name=MAX_FILE_SIZE value=2048> Send this file: input name=userfile type=file size=25> input type=submit value=Send File name=submit> /form> PHP CODE OUTPUT: code: echo Temp Name: . $_FILES['userfile']['tmp_name'] . br>; echo File Name: . $_FILES['userfile']['name'] . br>; echo File Type: . $_FILES['userfile']['type'] . br>; output: Temp Name: File Name: news.pdf File Type: Shad Kaske PGP.sig Description: PGP signature
[PHP] Help with Multiple Checkboxes
I am having some difficulty getting a list of check boxes to work properly. I have dug through the list archives, usenet, PHP Manuals, etc. and still I am unable to process multiple checkboxes from a form submission properly. The following is what I am running into. Form: input name=add type=checkbox id=add[] value=179 input name=add type=checkbox id=add[] value=409 input name=add type=checkbox id=add[] value=2090 PHP: for ($i = 0; $i count($_POST['add']); $i++) { echo $_POST['add'][$i]; echo br\n; } Output: 2 0 Any assistance will be greatly appreciated. Thanks in advance. Shad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php