php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27325 refer to previous Bug #17958 <input type=file> loses $_POST vars
Submitted: 2004-02-19 23:30 UTC Modified: 2004-02-20 00:43 UTC
From: rui at crocware dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.4 OS: winxp
Private report: No CVE-ID: None
 [2004-02-19 23:30 UTC] rui at crocware dot com
Description:
------------
refer to previous Bug #17958 <input type=file> loses $_POST vars

I got the same problem when I use Natscape 7.1, but there is no problem in IE6. How can I fix it.

thanks


Reproduce code:
---------------
       <form name="frmUpdateCust" method="POST" action="<? echo $PHP_SELF;?>" onSubmit="javascrip: return checkFileInput()">              
              <br>
              <font face="Arial, Helvetica, sans-serif">Select source CSV file: 
              <input type="file" name="csvfile" size="50">
              <br>
              </font><br>
              <input type="submit" name="Submit" value="Submit">
            </form>

Expected result:
----------------
when I retrieve: $csvfile=$_POST['csvfile']
In IE6, there is no problem
In Natscapt 7.1, the var is short cut

expected result: 
$csvfile="C:\Apache\Apache2\htdocs\crocwareweb\csv file\test.cvs"

Actual result:
--------------
actuall result:
$csvfile="test.cvs"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-20 00:43 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You need to put enctype="multipart/form-data" into the <form> tag..and your code is broken in many other ways too..uploaded files, etc. are in $_FILES array. 




 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC