simple upload and save jpeg

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • googlegroups@paul13.com

    simple upload and save jpeg

    OK, this is my first time trying to let folks upload a picture and save
    it. I use a very basic html file input from

    <form action="picact. php" method="post" enctype="multip art/form-data">
    <input name="picture_n ame" type="file" id="picture_nam e">
    <input type="submit" name="Submit" value="Submit">
    </form>

    In picact.php I try to run a simply copy function

    if(!(copy($pict ure_name, "images/picupload.jpeg" ))){
    echo "trouble"; }
    else {
    echo "worked";}

    it tells me it worked, but there is no file in the images folder, so I
    don't know what is going wrong. does anyone have any advice?

    I am using a static file name for now, to avoid any trouble with
    variable names.
    thanks,

    paul

  • Franck Nijhof - BlueSolid Software

    #2
    Re: simple upload and save jpeg

    googlegroups@pa ul13.com wrote:[color=blue]
    > OK, this is my first time trying to let folks upload a picture and save
    > it. I use a very basic html file input from
    >
    > <form action="picact. php" method="post" enctype="multip art/form-data">
    > <input name="picture_n ame" type="file" id="picture_nam e">
    > <input type="submit" name="Submit" value="Submit">
    > </form>
    >
    > In picact.php I try to run a simply copy function
    >
    > if(!(copy($pict ure_name, "images/picupload.jpeg" ))){
    > echo "trouble"; }
    > else {
    > echo "worked";}
    >
    > it tells me it worked, but there is no file in the images folder, so I
    > don't know what is going wrong. does anyone have any advice?
    >
    > I am using a static file name for now, to avoid any trouble with
    > variable names.
    > thanks,
    >
    > paul
    >[/color]


    You are totally on the wrong track.

    Please read:



    On that page you will find a example how it should be done.


    Franck Nijhof
    BlueSolid Software

    Comment

    Working...