Jump to content

[SOLVED] upload file


forcom

Recommended Posts

http://www.tizag.com/phpT/fileupload.php

 

 

Ok what am I doing wrong here. I followed everything but I am receiving error

 

Parse error: syntax error, unexpected ';' in \\table.php on line 243

 

 

<form enctype="multipart/form-data" action="vptable.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>



<?php

//location of uploaded images
$target_path="images/vpimages/upimages/";

$target_path =$target_path.basename($_FILE['uploadedfile']['name'];

if (move_uploaded_file($_FILE['uploadedfile']['temp_name'], $target_path)){
echo"The file ". basename($_FILE['uploadefile']['name']). " has been uploaded";} else {

echo "There was an error uploading file, Please try again!";

}



Link to comment
https://forums.phpfreaks.com/topic/162240-solved-upload-file/#findComment-856592
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.