•How to upload files using PHP?

Answer Posted / kapil dhiman

<?php

move_uploaded_file($_FILES['file']['tmp_name'],"images/".$_FILES['file']['name']);

?>
<form action="" method="post" enctype="multipart/form-data">
File<input type="file" name="file" /><input type="submit" name="sub" value="Upload" />
</form>

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between urlencode and urldecode?

715


Is it easy to learn wordpress?

739


What is the difference between md5(), crc32() and sha1() crypto on php?

831


What is the difference between session_unregister() and session_unset()?

827


What is php regular expression?

692


What is the difference between $argv and $argc? Give example?

688


Explain what is the difference between session and cookie?

748


What is $row in php?

716


What is better .net or php?

742


Tell me can the value of a constant change during the script's execution?

895


Explain what is the difference between for and foreach?

756


What is a comment in php?

816


How many functions are there in php?

723


What types of MYSQL function available for affecting columns

742


What are the php functions?

737