p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Default value for form type = file


Message #1 by "Wayne Frisch" <wfrisch@b...> on Sun, 17 Feb 2002 22:59:39
We all have seen the form input field which allows you to browse for a file

and upload it.



Question?



Does anyone know how I could insert a variable in their to be the default 

value. It seems there is no way to do this that I can find.



Also I have asked this question before in this forum with no response



Question



How in PHP could I reformat a unix type path returned to me from a  X 

control (which I cannot change) to windows path



example



c:\\folder\\file is returned



I want c:\folder\file  I know you can use " and ' quotes in strings 

however this is returned again as I mentioned before to me from a X 

control which I didn't write
Message #2 by "Nikolai Devereaux" <yomama@u...> on Mon, 18 Feb 2002 11:53:48 -0800

i'd assume that stripslashes would work for you:



http://www.php.net/stripslashes



as far as pre-setting the form input field, i read an HTML reference that

says setting the "Value" field should work... I don't know if this is

correct and not implemented in IE or what, but how would this really work?

You'd need to specify a filename for the CLIENT to browse for?  how so?



You'd have to use a file:// url since there's no guarantee what OS your

clients are browsing your site with.



take care,



nik



-----Original Message-----

From: Wayne Frisch [mailto:wfrisch@b...]

Sent: Sunday, February 17, 2002 11:00 PM

To: beginning php

Subject: [beginning_php] Default value for form type = file





We all have seen the form input field which allows you to browse for a file

and upload it.



Question?



Does anyone know how I could insert a variable in their to be the default

value. It seems there is no way to do this that I can find.



Also I have asked this question before in this forum with no response



Question



How in PHP could I reformat a unix type path returned to me from a  X

control (which I cannot change) to windows path



example



c:\\folder\\file is returned



I want c:\folder\file  I know you can use " and ' quotes in strings

however this is returned again as I mentioned before to me from a X

control which I didn't write




$subst('Email.Unsub').




  Return to Index