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

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>
and here is process.php in its entirety

include 'connect.php';
mysql_select_db($database, $cms);

$label = $_POST['label'];
$result = mysql_query("SELECT * FROM `counter`");
$i = $row[0];
$save = "$i.jpg";
move_uploaded_file($_FILES['imagefile']['tmp_name'], $save);

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

May 26 '07 #1
Share this Question
Share on Google+
1 Reply

P: 316
oops forgot to set permissions

May 26 '07 #2

Post your reply

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