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
https://forums.phpfreaks.com/topic/9320-how-to-populate-multipart-formdata-fields/
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.

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.