[PHP-DB] Problem with uploadscript

2003-10-08 Thread Ruprecht Helms
Hi,

I've problems with a http-uploadscript. When I run the htmlfile and the
script replies an output of the filename but I can't find the file in
the destinationdirectory.

Why this can happen. Addes you can see the html-file and the script

Regards,
Ruprecht



html
head
  title/title
  meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-15
  meta name=GENERATOR content=Quanta Plus
/head
body
form action=upload_http.php enctype=multipart/form-data
input type=hidden name=MAX_FILE_SIZE value=1
pDatei:input type=file name=userfile
input type=text name=zielpfad value=html/p
input type=submit value=hochladen
input type=reset value=abbrechen
/form
/body
/html



?

echo 'Dateiname:  ';
echo $userfile;
//chdir('html');
move_uploaded_file($userfile,'html')
?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Problem with uploadscript

2003-10-08 Thread George Patterson
On 08 Oct 2003 17:26:55 +0200
Ruprecht Helms [EMAIL PROTECTED] wrote:

 Hi,
 
 I've problems with a http-uploadscript. When I run the htmlfile and
 the script replies an output of the filename but I can't find the file
 in the destinationdirectory.
 
 Why this can happen. Addes you can see the html-file and the script
 
 Regards,
 Ruprecht
 
 

Ruprecht,

I was tempted to say RTFM section 
(Handling file uploads http://www.php.net/features.file-upload) as
this is mostly off topic for a php-db mail list. But you caught me on a
better night..

First, You must use the form POST method... If the method is not
specified, the browser will perform a GET request.. You really don't
want that, even if you could do it.

Change the form tag to read...
form action=upload_http.php method=post enctype=
multipart/form-data


That resolves the html problem. 

As for the php... 

We also need the version of php that you are using as this has changed.
Example 18.2 is pretty good for the type of code you need.


George Patterson

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php