...

View Full Version : Problem displaying text in file-boxes



Pompiuses
06-28-2002, 02:18 PM
I'm making a site where users can upload pictures as many times as they want. If they already have uploaded a picture, the picture name shall be displayed in the file-box. Like this:

<?
//This variable is collected from a database
$pic1 = "test.jpg";
?>

<FORM name="memberForm" action="editmember.php" method="post" encType="multipart/form-data">

<INPUT type=file name=picture1 value='<?echo "$pic1";?>'>

</FORM>

The problem here is that the text in $pic1 is'nt displayed in the 'picture1' file-box. How can I make this work???

SYP}{ER
06-28-2002, 02:22 PM
You can't. It's a security thing :)

Just imagine if people could make you upload whatever they wanted from you as you filled out their form? They could steal your "My Documents" folder and read all about you :eek:

Pompiuses
06-28-2002, 02:25 PM
argh :(

Do you have any other suggestion to how this problem may be solved?

Spookster
06-28-2002, 04:07 PM
Just do like most dating sites do. Display the current picture they have on the site and if they want to change it they use the browse for file thing to select which one they want to replace it with. Then as it is uploaded to the server rename/replace it with the one that is already on the server.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum