Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
| Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2006, 10:27 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default INPUT type=file (Urget Help)

i have to upload c:\test.jpg every time. But to select this file i am using <input type=file name=filename> and on the another page i am uploing the file that is coming from filename.

But as i have to same file ( c:\test.jpg ) everytime i inserted value field
<input type=file name=filename value=c:\test.jpg> but this value tag is not picking up the file.

Could anyone one please tell me how to pick the file with value field. I need user just have to press UPLOAD button. because evrytime i have to upload the same file.

surendran
(Anything is Possible)
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
 
Old April 9th, 2006, 12:42 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

It is not possible to set the value attribute of a file input. If you could do so, you could upload any file from a user's computer, thus compromising security.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html




Similar Threads
Thread Thread Starter Forum Replies Last Post
input type file design in firefox ragu_nit Javascript 3 August 27th, 2007 02:20 PM
input type="file" grstad Classic ASP Basics 24 January 31st, 2007 07:28 PM
Input type=file apply a filter?? italiansensation ASP.NET 1.x and 2.0 Application Design 3 May 24th, 2006 04:06 AM
input type file darkhalf Javascript 1 October 29th, 2005 02:17 AM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.