Jump to content

Value of $_FILES


onlyican

Recommended Posts

Hey

Something we discussed ages ago, and never got a solution (might have been another forum)

As an example
I have a form
[code]
<form method='post' action='' enctype='multipart/form-data'>
<input type='files' name='ufile' /><br />
<input type='text' name='file_name' value='".$_POST["file_name"]."' /><br />
<input type='submit' value='Upload' />
</form>
[/code]

As you can see, I am using $_POST to get the value of the form, so when validating, if they miss a field, they dont have to complete the whole form again

Certain things on my form I dont want a value for
Passwords
Agree to terms and conditions

BUT
I would like a value for the image
Does anyone know how to do this

Last time we suggested that I store the details I need, and have a link, saying change image click here
then parse the values over again
BUT
I want to know can I do something like
<input type='file' name='ufile' value='".$_FILES["ufile"]["name"]."' />
which dont work, but I hope u understand
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.