saving a file received by a form

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

    saving a file received by a form


    Hello

    I am just another newbie programmer in PHP and web developping and in
    the three days I have been messing up with it I have been able to do
    all the things I wished except one. When I receive variables from a
    form, like a string with the name I can read them with $_POST["name"]
    without problem. But when the form sends to me a file, I haven't found
    how to save it into my system.

    I guess I can access to it with $_POST["file"], fopen it, and then do
    fread and fwrite in another file. But this seems to me like a too much
    unconfortable way of doing it, so I ask here what is the normal way of
    saving a file sent by a form.


    Lot of thanks for your help

    Jorge
  • Tim Van Wassenhove

    #2
    Re: saving a file received by a form

    In article <qjb4j01g1imln4 gdi10i04kltmajg kc2at@4ax.com>, Jorge wrote:[color=blue]
    >
    > Hello
    >
    > I am just another newbie programmer in PHP and web developping and in
    > the three days I have been messing up with it I have been able to do
    > all the things I wished except one. When I receive variables from a
    > form, like a string with the name I can read them with $_POST["name"]
    > without problem. But when the form sends to me a file, I haven't found
    > how to save it into my system.[/color]

    The primary source for information, the PHP manual:





    --
    Tim Van Wassenhove <http://home.mysth.be/~timvw>

    Comment

    • Jorge

      #3
      Re: saving a file received by a form

      On 29 Aug 2004 20:41:01 GMT, Tim Van Wassenhove <euki@pi.be> wrote:
      [color=blue][color=green]
      >>
      >> I am just another newbie programmer in PHP and web developping and in
      >> the three days I have been messing up with it I have been able to do
      >> all the things I wished except one. When I receive variables from a
      >> form, like a string with the name I can read them with $_POST["name"]
      >> without problem. But when the form sends to me a file, I haven't found
      >> how to save it into my system.[/color]
      >
      >The primary source for information, the PHP manual:
      >
      >http://be2.php.net/features.file-upload[/color]

      I feel a little bad to ask a question that obviously I could have
      solved by myself, but I suppose that today I had my searching skills
      in bad fit.

      So a lot of thanks, Tim

      Jorge

      Comment

      Working...