i want help

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
red fox
New php-forum User
New php-forum User
Posts: 39
Joined: Tue Nov 22, 2005 8:14 am

Mon Feb 27, 2006 7:09 am

i am beginer in html i need explain this code for upload
i need know :help:
what meaning type="hiden" and enctype="multipart/formdata" and name="MAX_FILE_SIZE"

Code: Select all

<form action="save.php" enctype="multipart/formdata" mothed="post">
<input type="hiden" name="MAX_FILE_SIZE" value="1000000">
<input type="file" name="uploadedfile">
<input type="submit" value="uploadfile">

User avatar
New php-forum User
New php-forum User
Posts: 21
Joined: Mon Feb 13, 2006 1:54 am
Location: South Africa

Mon Feb 27, 2006 8:05 am

<input type="hidden" ...> is a field on the html page that holds a value but doesnt display it, anytime you need to store a value in the form but the user mustn't see it, you use the hidden input type. enctype="multipart/formdata" just tells the page that processes the form, in this case "save.php" what form the data is transmitted in. enctype -> encoding type. This must be set on any form where you are uploading a file. The hidden field, <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> is a field that 'save.php' can look at to see if the file is too large.

Basically this form does the following :-
1) specifies the page that will process it - (action="save.php")
2) specifies the way the data will be sent - (enctype="multipart/formdata")
3) specifies how it must be referred to by 'save.php' - (method="post")
4) specifies the maximum file size for 'save.php' to look at - (<input type="hiden" name="MAX_FILE_SIZE" value="1000000">)
5) allows the user to select a file - (<input type="file" name="uploadedfile">)
6) shows a submit button that will send all the data to 'save.php' - (<input type="submit" value="uploadfile">)
Power is the only pure motivator of humanity

New php-forum User
New php-forum User
Posts: 243
Joined: Wed Feb 01, 2006 9:18 am
Location: Netherlands

Mon Feb 27, 2006 11:12 am

note that it should be <input type="hidden" ... /> - double d

Post Reply