Jump to content

$_FILES["myfile"]["tmp_name"] not working


robert_gsfame

Recommended Posts

Hi, i have problem with $_FILES for upload, below is the code

 

<?php

if(isset($_POST['submit'])){

$temp=$_FILES["temp"]["tmp_name"];}

?>

 

<html>

<head>

<body>

<form name="form1" method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>">

<input type="file" name="temp">

<input type="submit" value="submit">

</form>

<?php echo $temp;?>

</body>

</head>

</html>

 

why does this code won't work as i can't get the value of echo $temp after submit button pressed although certain file has been chosen

 

thx

Link to comment
https://forums.phpfreaks.com/topic/182579-_filesmyfiletmp_name-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.