Jump to content

How to populate multipart form/data fields


kolakube

Recommended Posts

Hiya all

Just started PHP, Im having problems populating a field from the data base, here goes

<input name="PHOTOONE" type="file" size="35" VALUE="<?php print "$row[PHOTOONE]"; ?>">

when i try and preview this I get nothing on the field, if i had it on [b]type ="text"[/b] this works, but I want to create an edit page so I can populate the field with the existing field name, so if i do not want to update the info it will just post the old data field.

Maybe Im missing something..

Many thanks
Link to comment
Share on other sites

[!--quoteo(post=372325:date=May 8 2006, 01:18 PM:name=kola)--][div class=\'quotetop\']QUOTE(kola @ May 8 2006, 01:18 PM) [snapback]372325[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hiya all

Just started PHP, Im having problems populating a field from the data base, here goes

<input name="PHOTOONE" type="file" size="35" VALUE="<?php print "$row[PHOTOONE]"; ?>">

when i try and preview this I get nothing on the field, if i had it on [b]type ="text"[/b] this works, but I want to create an edit page so I can populate the field with the existing field name, so if i do not want to update the info it will just post the old data field.

Maybe Im missing something..

Many thanks
[/quote]

i don't think it's possible to populate type file boxes... the best thing to do in that situation is display the contents above the empty box (if any is present) and when they attempt to upload yet another file, then replace the old data on the submit.

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.