473,385 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Redisplaying upload field value

58
I have a form that redisplays user input for checking before the final submission.
i got all values redisplayed except the selected file for upload.
While i can have something like this in other fields:
Expand|Select|Wrap|Line Numbers
  1. <INPUT type="text" name="First Name"  value="<?=$_POST['First_Name']?>" 
  2.  
[Please use CODE tags when posting source code. Thanks! --pbmods]

Expand|Select|Wrap|Line Numbers
  1. I dont know how to do the same thing for the upload field:
  2. <input name="MAX_FILE_SIZE" type="hidden" value="100000">
  3. <input name="userFile" type="file"><br> 
  4. <input name="submit" type="submit" value="Submit"> 
  5.  
Thank you for your support
Jun 9 '07 #1
4 1266
epots9
1,351 Expert 1GB
u can find your answer here: http://www.php.net/features.file-upload

it will help u store the file as well, and how to protect yourself too
Jun 9 '07 #2
Jankie
58
Thanks,but the mentioned article didnt address what i mentioned above,
Anybody else?
Jun 10 '07 #3
ak1dnar
1,584 Expert 1GB
I have a form that redisplays user input for checking before the final submission.
i got all values redisplayed except the selected file for upload.
While i can have something like this in other fields:
<INPUT type="text" name="First Name" value="<?=$_POST['First_Name']?>"
Yeah this line will print the text values you got from the POST method.
So, what do do you need to print from this.

[HTML]<input name="userFile" type="file">[/HTML]

is it contents of the file,or name of the file ? or something else?
and where you want to redisplay them.In a form field ?
Jun 10 '07 #4
pbmods
5,821 Expert 4TB
I would recommend changing your form design. If a User were to provide an invalid first name, for instance, he shouldn't have to re-upload his file.

If the file he provided was invalid, then it wouldn't make sense to repopulate the file input anyway. And all browsers that I know of will save the User's last selection in the Open dialog when he clicks on the 'Browse...' button in a file input.
Jun 10 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
3
by: Jefferis NoSpamme | last post by:
Hello all, I'm trying to limit the file size to 1 meg on upload of image files and I am trying a script from javascript internet, but it is giving me errors on IE ² is null or not an object ³...
9
by: Steve Poe | last post by:
I work for an animal hospital trying to use PHP to store an animal's dental x-rays to a file server. I can browse for the xray on the local desktop computer then click "Upload Image". This...
0
by: Gil | last post by:
Hello, In my local server i can upload my files but i could not upload files in webserver , i dont know what is problem. while executing the source code i get an error...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
7
by: xx75vulcan | last post by:
Hi, I've got a PHP Upload Form that works great, unless that is, the image your uploading has been modified through a photo editing software. Example: if I upload the image straight from a...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
2
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
7
by: dragiton | last post by:
SA Upload SQL Database variable types (image upload and storage) I am having trouble with the SA Upload utility. The following code used to work correctly. However, I lost my database and had to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.