Jump to content

file browser problem


burge124

Recommended Posts

hi, ive got a file browser where the user selects which file they want to upload to the database, although i cant get selection the user chooses to be passed on so that the page requested is used! any help would be great thanks!

 

<form enctype="multipart/form-data" action="" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a question to upload: 
<input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
<label>
<input name="reset1" type="reset" id="reset1" value="Reset" />
</label>
</form>
<p> </p>

<?
$SelectedFile = $_POST['uploadedfile']; // 
echo '$SelectedFile' // echo the selected files name
?>

Link to comment
https://forums.phpfreaks.com/topic/94308-file-browser-problem/#findComment-482999
Share on other sites

The MAX_FILE_SIZE in the form is not checked by the browser. No past or present browser has ever checked it. Php does check it if it is present and sets an error if the uploaded file is greater than the value -

 

UPLOAD_ERR_FORM_SIZE

Value: 2

Link to comment
https://forums.phpfreaks.com/topic/94308-file-browser-problem/#findComment-483069
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.