Jump to content

Archived

This topic is now archived and is closed to further replies.

kolakube

How to populate multipart form/data fields

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Thx for the quick response Gold, I had thought about that, but when I see scripts like 4imagegallery edit page I was think maybe there may be an easy way round this.

as again thx for the reply :-)

Share this post


Link to post
Share on other sites

×

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.