473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

uploaded file not saving - move_uploaded_file doesn't

tolkienarda
316 100+
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
1 2017
tolkienarda
316 100+
oops forgot to set permissions

eric
May 26 '07 #2

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

Similar topics

1
by: James Jiao | last post by:
Hi all I am having a little trouble uploading files (html form with post) with php... I am trying to copy the file from its temporary upload directory to the destination directory, however,...
2
by: Don | last post by:
Hi all, I need to read an uploaded file into chunks, so I can examine the acculative size between chunks to determine if a maximum size is being exceeded. I'm currently using the PHP function...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
6
by: Kimmo Laine | last post by:
Running IIS 6 on Windows 2003 server. After an update to the most recent version of php 5.1.2, for some reacon a function handling uploaded files using is_file stopped working. is_file failed...
1
by: manubsot | last post by:
Hai, i am MAnu.I use one function "move_uploaded_file" in php for upload one file.After uploading i went to ftp for copying that uploed file.But i dont have permission.I tried to give full...
2
by: Muddasir | last post by:
Hi All. Anyone plz tell me how can I upload a file with the file name of my choice. am having problem with this, the file got uploaded but not with the name I wanted to...how can I do this...
10
by: jonathan184 | last post by:
Hi I am tryin to validate certian types of files to be uploaded and file size and if this follows this correctly then insert in db this is the code i did so far. So far I commented out the parts...
3
by: jodleren | last post by:
Hi! When a file is uploaded, using <input type=file>, I get it as a temp- file. Will it stay there, so I can check the user whether to overwrite an existing file? WBR Sonnich
0
by: Lawrence Krubner | last post by:
Imagine I have a site where users can upload files. Now imagine we are enfocing a 100 meg limit on each account. The user uploads a file, the code checks to see if they are already over their...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.