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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.