Question

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

Était-ce utile?

La solution

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

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top