File Operation in PHP

Posted by

<?php
if(isset($_post['submit']))
{
$img=$_files['image']['name'];
$img_loc = $_files['image']['tmp_name'];
$img_folder="upload1/";
if(move_uploaded_file($img_loc,$img_folder.$img))
{
echo "uploaded successfully.";
}
else
{
echo "failed.";
}
}
?>
<html>
<body>
<form action="function.php" method="post" enctype="multipart/form-data">
<input type="file" name="image"/><br>
<input type="submit"/>
</form>
</body>
</html>

Give Input

Output

guest


0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x