Why does PHP not GET the form input from this HTML form?

Rand
<form method="post" enctype="multipart/form-data" name="formUploadFile">      
<label>Select files to upload:</label>
<input type="file" name="files[]" multiple="multiple" /><br>
IF you didn't add tags in the image titles your can add them here "," seperated eg tagone,tagtwo,tagthree,tagfour <br> 
<input type="text" name="Tags"><br>
<input type="submit" value="Upload File" name="btnSubmit"/>
</form>

<?php

$tags =  $_GET["Tags"];

    foreach($_FILES["files"]["tmp_name"] as $key=>$tmp_name){
    $temp = $_FILES["files"]["tmp_name"][$key];
    $name = $_FILES["files"]["name"][$key];

    if(empty($temp))
    {
            break;
    }
Quentin

The $_GET superglobal is populated by data from the query string of the URL.

A form, with method="POST", will put data from the form controls in the request body, not the query string. (Data in the query string of the action will still be there).

You need to read it from $_POST (except for files which are in $_FILES).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Get the type of a input from an HTML form

From Dev

PHP output from HTML input Form

From Dev

Get ID from HTML form - PHP

From Dev

Get input from HTML form as an Array and Check if there is input in the array or not

From Dev

Is it possible to get form input into another html form

From Dev

PHP script in FORM HTML <input>

From Dev

Undefined value when calling an input from a HTML form from PHP

From

Parse input from HTML <form>

From Dev

PHP arrays from form input

From Dev

File_get_html url variable from input search FORM

From Dev

Get all input field names from an HTML form with code

From Dev

How to get json from HTML form and keep type of input

From Dev

POST and GET are unable to display user input values from HTML form

From Dev

Why can't I get HTML form to pass values to PHP?

From Dev

Get a return from JQuery to a PHP variable in a simple HTML PHP Form

From Dev

Why does adding a ref in a `react-hook-form` input element prevent the form from rendering?

From Dev

Why cant i get the value from this form using ajax and php?

From Dev

Get values from HTML form

From Dev

How to get file root value from html form or php

From Dev

not able to get the data from html form to php script

From Dev

Why isn't request.form.get() getting the form input?

From Dev

HTML/PHP Form - Input Type "Date"

From Dev

Sending hidden HTML form input to PHP

From Dev

Using PHP Variables as HTML Form Input Attributes

From Dev

HTML + FORM + INPUT + REMPLACE code + PHP

From Dev

HTML form input control before form action tot php

From Dev

Why input from the form is not being passed

From Dev

Why does my HTML form not send user input to Google Sheets properly when I have an onsubmit event in my form?

From Dev

In Html why does clicking on regular button within form action the form

Related Related

  1. 1

    Get the type of a input from an HTML form

  2. 2

    PHP output from HTML input Form

  3. 3

    Get ID from HTML form - PHP

  4. 4

    Get input from HTML form as an Array and Check if there is input in the array or not

  5. 5

    Is it possible to get form input into another html form

  6. 6

    PHP script in FORM HTML <input>

  7. 7

    Undefined value when calling an input from a HTML form from PHP

  8. 8

    Parse input from HTML <form>

  9. 9

    PHP arrays from form input

  10. 10

    File_get_html url variable from input search FORM

  11. 11

    Get all input field names from an HTML form with code

  12. 12

    How to get json from HTML form and keep type of input

  13. 13

    POST and GET are unable to display user input values from HTML form

  14. 14

    Why can't I get HTML form to pass values to PHP?

  15. 15

    Get a return from JQuery to a PHP variable in a simple HTML PHP Form

  16. 16

    Why does adding a ref in a `react-hook-form` input element prevent the form from rendering?

  17. 17

    Why cant i get the value from this form using ajax and php?

  18. 18

    Get values from HTML form

  19. 19

    How to get file root value from html form or php

  20. 20

    not able to get the data from html form to php script

  21. 21

    Why isn't request.form.get() getting the form input?

  22. 22

    HTML/PHP Form - Input Type "Date"

  23. 23

    Sending hidden HTML form input to PHP

  24. 24

    Using PHP Variables as HTML Form Input Attributes

  25. 25

    HTML + FORM + INPUT + REMPLACE code + PHP

  26. 26

    HTML form input control before form action tot php

  27. 27

    Why input from the form is not being passed

  28. 28

    Why does my HTML form not send user input to Google Sheets properly when I have an onsubmit event in my form?

  29. 29

    In Html why does clicking on regular button within form action the form

HotTag

Archive