Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

i want help

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

i want help

Postby red fox » Mon Feb 27, 2006 7:09 am

hi
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">
</form>
red fox
New php-forum User
New php-forum User
 
Posts: 39
Joined: Tue Nov 22, 2005 8:14 am

Postby revq » 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">)
User avatar
revq
New php-forum User
New php-forum User
 
Posts: 21
Joined: Mon Feb 13, 2006 1:54 am
Location: South Africa

Postby Coditor » Mon Feb 27, 2006 11:12 am

note that it should be <input type="hidden" ... /> - double d
Coditor
New php-forum User
New php-forum User
 
Posts: 243
Joined: Wed Feb 01, 2006 9:18 am
Location: Netherlands


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron