Page 1 of 1

Accessing of file info from $_POST['xxx'];

Posted: Thu Apr 24, 2003 6:36 am
by RedRasper
Hi,

I'm having a problem with passing form data from a html page to a php page. I've managed previously to transfer data using $_POST .

The problem I'm having is I am now trying to tranfer a file, and I'm told php creates 4 extentions for size, name, type, and the file. I've tried to get at it with $_POST but to no avail. Can anyone help?

---------

from uploader.html

<form action="uploader.php" method="post" enctype="multipart/form-data">
<input type="file" name="file1" size="50">
<br/>
<input type="submit" value="Upload File">

------

from uploader.php

$file = $_POST['file1'];
$file_name = $_POST['file1_name'];
$file_size = $_POST['file1_size'];
$file_type = $_POST['file1_type'];

-----

As I say this doesn't appear to get the data I need!!

Many thanks for any help

RedRasper

Posted: Thu Apr 24, 2003 7:16 am
by twigletmac

Posted: Thu Apr 24, 2003 11:18 am
by RedRasper
Thank you! :D I'd been looking at the help, but not found that page. Got it working now!

Cheers

RedRasper