Page 1 of 1

file inputs/upload

Posted: Fri Apr 25, 2003 6:33 pm
by nincha
i got a form that sends a file to another php script

Code: Select all

<form name="test" enctype="multipart/form-data" method="post" action="testing3.php">
	<input type="file" name="file1"><input type="submit" name="submit" value="test"></form>
now in testing3.php i can acess the filename by using the variable file1_name, but i would like to access it with some other variable so i can use a loop.. Can some one tell me the syntax to do this. And also, why cant i access file1 by using $_POST['file1']? Thnx lots
and

Posted: Fri Apr 25, 2003 7:13 pm
by m3mn0n

Code: Select all

<?php
$file = trim($file1);
// now $file is in an easier form to work with
?>

Posted: Fri Apr 25, 2003 7:13 pm
by nincha
nevermind u guys....i figured it out :oops: thnx alot though

Posted: Fri Apr 25, 2003 7:17 pm
by m3mn0n
...i updated the snipplet, used trim()instead.