From POST to GET: $_FILES empty

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Bedford

    From POST to GET: $_FILES empty

    I'm passing the code from $_POST to $_GET.

    I've a page upload using $_FILES. when the page was in $_POST, it worked
    fine, but now, in $_GET, the $_FILES is empty.

    any idea ?


  • Janwillem Borleffs

    #2
    Re: From POST to GET: $_FILES empty

    Bob Bedford wrote:[color=blue]
    > I'm passing the code from $_POST to $_GET.
    >
    > I've a page upload using $_FILES. when the page was in $_POST, it
    > worked fine, but now, in $_GET, the $_FILES is empty.
    >
    > any idea ?[/color]

    File uploads only work with POST.


    JW



    Comment

    • Matthias Esken

      #3
      Re: From POST to GET: $_FILES empty

      Bob Bedford wrote:
      [color=blue]
      > I've a page upload using $_FILES. when the page was in $_POST, it worked
      > fine, but now, in $_GET, the $_FILES is empty.[/color]

      If you want to upload files, you _must_ use POST for the form.

      Regards,
      Matthias

      Comment

      • Ilija Studen

        #4
        Re: From POST to GET: $_FILES empty

        Bob Bedford wrote:[color=blue]
        > I'm passing the code from $_POST to $_GET.
        >
        > I've a page upload using $_FILES. when the page was in $_POST, it worked
        > fine, but now, in $_GET, the $_FILES is empty.
        >
        > any idea ?
        >[/color]

        And dont forget to add attr enctype="multip art/form-data" to <form> tag ;)

        Comment

        Working...