2
votes

By now I know to upload file form is using ENCTYPE="multipart/form-data. But when we want to transfer form datat to mysql via php file what should be the enctpe=""?

<form action="process.php" method="POST" name="contactform"  onSubmit="return ValidateForm(this);  ENCTYPE="multipart/form-data">

Can we use ENCTYPE="multipart/form-data" if not what should i use???

Please answer me

Thanks

2
unless your passing files through you shouldn't need to use enctype="multipart/form-data" - Liam Sorsby
Processing is an open source programming language and environment for people who want to create images, animations, and interactions. - Strawberry

2 Answers

4
votes

You don't need to fill in a form enctype when you aren't using a file upload. The default value is: "application/x-www-form-urlencoded". (when enctype not provided)

Conclusion: leave empty or use "multipart/form-data" when you need to upload a file.

See: http://www.w3schools.com/tags/att_form_enctype.asp

1
votes

Basically ENCTYPE is the property of form. This is not necessory to use this property, it is optional.