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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.