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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rui at crocware dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 22:01:33 2025 UTC