Skip to content
Advertisement

Can enctype=”multipart/form-data” be used for non file inputs as well?

Is this allowed?

<form enctype="multipart/form-data" action="__URL__" method="POST">
  <input type="text" name="text_input" />
  <input type="other_types" name="other_types_input" />
  <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
  <input name="userfile" type="file" />
  <input type="submit" value="Submit" />
</form>

It will be used with PHP…

Advertisement

Answer

Yes, it’s absolutely correct. No issues.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement