Jump to content

Upload Problem


sungpeng

Recommended Posts

<?php

include 'config.php';
if($_POST[action]=="Update")
{	





               

			$folder_path="instant/";
			$image_path=$folder_path.$_FILES['imagefile']['name'];
			$img_name=$_FILES['imagefile']['name'];

			copy($imagefile, "$image_path");


          }			






?>

<html>

<title>Upload an image to a database</title>


<body>



<h2>Update with new information</h2>

<form name="form" enctype="multipart/form-data" method="post" action="<?php echo"$PHP_SELF?pid=$_GET[pid]"; ?>">
<input type='file' name='imagefile'><br>

<input type="submit" name="action" value="Update">
</form>

</body>
</html>

 

Hi good day check is there error in my code? Why I cannot upload anything picture using this code. Thank

Link to comment
https://forums.phpfreaks.com/topic/148057-upload-problem/
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.