Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-28-2002, 02:18 PM   PM User | #1
Pompiuses
Regular Coder

 
Join Date: Jun 2002
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Pompiuses is an unknown quantity at this point
Problem displaying text in file-boxes

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???
Pompiuses is offline   Reply With Quote
Old 06-28-2002, 02:22 PM   PM User | #2
SYP}{ER
Regular Coder

 
Join Date: Jun 2002
Location: Ontario, Canada
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
SYP}{ER is an unknown quantity at this point
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
__________________
Offtone.com - In the works...
SYP}{ER is offline   Reply With Quote
Old 06-28-2002, 02:25 PM   PM User | #3
Pompiuses
Regular Coder

 
Join Date: Jun 2002
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Pompiuses is an unknown quantity at this point
argh

Do you have any other suggestion to how this problem may be solved?
Pompiuses is offline   Reply With Quote
Old 06-28-2002, 04:07 PM   PM User | #4
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:44 PM.


Advertisement
Log in to turn off these ads.