uploaded file not saving - move_uploaded_file doesn't

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tolkienarda
    Contributor
    • Dec 2006
    • 316

    uploaded file not saving - move_uploaded_file doesn't

    hi all
    i am doing a simple upload script of the sort i do all the time below is the script that dosen't work
    here is the html that sends the stuff to to my script
    [CODE=html]
    <html>
    <head>
    <title>Untitl ed Document</title>
    </head>
    <body>
    <form action="process .php" method="post" enctype="multip art/form-data">
    <input type="file" name='imagefile '><br>
    <input type="submit">
    </form>
    </body>
    </html>
    [/CODE]
    and here is process.php in its entirety

    [PHP]
    <?
    include 'connect.php';
    mysql_select_db ($database, $cms);

    $label = $_POST['label'];
    $result = mysql_query("SE LECT * FROM `counter`");
    $row=mysql_fetc h_row($result);
    $i = $row[0];
    $i++;
    $save = "$i.jpg";
    move_uploaded_f ile($_FILES['imagefile']['tmp_name'], $save);
    ?>
    [/PHP]

    i have done var dump on $_FILES and everything seems fine, i have printed out $save and the correct value is there, i put double quotes around the $save variable in the function call once to see if that helped but still to no avail, i don't know what is going on this is so simple it is totaly ridiculas, by the way $i = 2 in this case,

    thanks for help

    eric
    Last edited by pbmods; May 26 '07, 11:39 PM. Reason: Changed code language. Thanks for using CODE tags!
  • tolkienarda
    Contributor
    • Dec 2006
    • 316

    #2
    oops forgot to set permissions

    eric

    Comment

    Working...