By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

uploaded file not saving - move_uploaded_file doesn't

tolkienarda
100+
P: 316
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
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Untitled Document</title>
  4. </head>
  5. <body>
  6. <form action="process.php" method="post"  enctype="multipart/form-data">
  7. <input type="file" name='imagefile'><br>
  8. <input type="submit">
  9. </form>
  10. </body>
  11. </html>
  12.  
and here is process.php in its entirety

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

$label = $_POST['label'];
$result = mysql_query("SELECT * FROM `counter`");
$row=mysql_fetch_row($result);
$i = $row[0];
$i++;
$save = "$i.jpg";
move_uploaded_file($_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
May 26 '07 #1
Share this Question
Share on Google+
1 Reply


tolkienarda
100+
P: 316
oops forgot to set permissions

eric
May 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.