robert_gsfame Posted November 23, 2009 Share Posted November 23, 2009 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 More sharing options...
robert_gsfame Posted November 23, 2009 Author Share Posted November 23, 2009 forget to put the enctype!! silly me Link to comment https://forums.phpfreaks.com/topic/182579-_filesmyfiletmp_name-not-working/#findComment-963708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.