ID:               32449
 Updated by:       [EMAIL PROTECTED]
 Reported By:      azz0r at wuggawoo dot co dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: Unknown
 PHP Version:      4.3.10
 New Comment:

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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2005-03-25 00:07:01] azz0r at wuggawoo dot co dot uk

Description:
------------
Basically I have a form where the user submits a file.

If a file is submitted in the header function is used it refuses to
recognize the variables and thus goes to the wrong page.

I have echoed these variables before and commented out the header
function and theyre fine. As a work around Ive had to code a function
that redirects using javascript.

Reproduce code:
---------------
        {$exploded = explode(".", $_FILES['attachment']['name']);
        $original_name = $exploded[0];
        $extension = strtolower($exploded[count($exploded) - 1]);
        $mime = $_FILES['attachment']['type'];
        $size = $_FILES['attachment']['size'];
        
        query("INSERT INTO $forumzDB.forumz_attachments (`aid`, `extension`,
`uid`, `pid`, `time`, `mime`, `size`, `views`, `original_name`) VALUES
('', '$extension', '$uid', '$pq->pid', '$time', '$mime', '$size', '1',
'$original_name')") or die_query(7); 
        $aid = mysql_fetch_object(query("SELECT aid, time, extension FROM
$forumzDB.forumz_attachments WHERE uid = '$uid' ORDER BY aid DESC LIMIT
1")) or die_query(8);//last attachment by user - we want the aid to
brand the file

        $filename = "$aid->aid$aid->time.$extension";
        copy($_FILES['attachment']['tmp_name'],
"images/attachments/$filename"); 
        unlink($_FILES['attachment']['tmp_name']);}}

        if($forum_properties['attachments'] == 1)
        {success_box("Your post has been added. $filebig",
"".$forum_properties['base_url']."/thread/$tid/$pages#$pq->pid");}
        else
        {header("Location:
".$forum_properties['base_url']."/thread/$tid/$pages#$pid");}

Expected result:
----------------
Ideally I wouldnt need the end if statement and it would use the header
command directly thus taking the user straight to the page.

Actual result:
--------------
The header command goes to the base url but ignores the variables.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32449&edit=1

Reply via email to