RE: [PHP-DB] File input from form not detected

2003-06-02 Thread Dewi Wahyuni
Hi everyone 


I changed the code a bit. Using the file tmp now.

Here's the code and the error (still error but less) 

Thanks for the help



upload.php

-



error code 
--
error. File: /tmp/phpObl8LE.
Warning: filesize() [function.filesize]: Stat failed for b_about.gif (errno=2 - No 
such file or directory) in /home/bus8646/www/tryout/upload.php on line 10

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in 
/home/bus8646/www/tryout/upload.php on line 15
Query failed





Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

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



Re: [PHP-DB] File input from form not detected

2003-06-01 Thread Dewi Wahyuni
Hi everyone thanks.
I did add the enctype but it's still not working. Here're
 the codes
Sorry if I posted to the wrong list. because I was trying to store the file as well in 
the mysql db blob. Someone suggested to print all the $ post vars as I print, only the 
MAX_FILE_SIZE shows up as a variable. I also tried directy assigning $userfile = "C: 
blabla" and it gives the same thing
 
One more thing do I have to use base_64 encode for this ? 

upload.html
---



  
  Send this file: 
  
  




upload.php
--



errors example filename tried to upload is c:\\windows\Backgrnd.gif


error. File: .
Warning: fopen(Backgrnd.gif) [function.fopen]: failed to create stream: No such file 
or directory in /home/bus8646/www/tryout/upload.php on line 9

Warning: filesize() [function.filesize]: Stat failed for Backgrnd.gif (errno=2 - No 
such file or directory) in /home/bus8646/www/tryout/upload.php on line 10

Warning: fread(): supplied argument is not a valid stream resource in 
/home/bus8646/www/tryout/upload.php on line 10

Warning: fclose(): supplied argument is not a valid stream resource in 
/home/bus8646/www/tryout/upload.php on line 11
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in 
/home/bus8646/www/tryout/upload.php on line 15

Query failed





Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

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



Re: [PHP-DB] File input from form not detected

2003-05-30 Thread Paul Burney
on 05/30/2003 9:16 AM, Dewi Wahyuni at [EMAIL PROTECTED] appended the following
bits to my mbox:

> if($userfile) it fails. BUT $userfile_name is able to  display the filename .

I just tried the script on your site...

It looks like you are trying to fopen the actual file name.  You need to
fopen the temp file name, i.e., $_FILES["userfile"]["tmp_name"], usually
something like /tmp/phpCcDfs.

HTH.

Paul


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



RE: [PHP-DB] File input from form not detected

2003-05-30 Thread Hutchins, Richard
If I understand your post and desired outcome correctly, I think the problem
would lie in the upload.php file. You may need to post the code from that
file for anybody to really help you out.

Rich

> -Original Message-
> From: Dewi Wahyuni [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] File input from form not detected 
> 
> 
> 
> Hi, following my earlier post
> 
> My input file from form in eg upload.html was not detected in 
> the upload.php (handler)
> 
> The example can be seen in 
> http://www.busybees.com.my/tryout/upload.html
> 
> I tried uploading using the 
> 
> which is supposed to be captured by the php as $userfile (as 
> far as I know) but whenever I put 
> 
> if($userfile) it fails. BUT $userfile_name is able to  
> display the filename . 
> 
> With print_f($HTTP_POST_VARS) also the userfile was not 
> displayed, only other input element which is Maximum file 
> size is displayed 
> 
> My register_globals is 'on' as you can see if you try the 
> example in the above url. I have given the phpinfo() in upload.php
> 
> I can handle all other data from forms except files.
> 
> Please help
> THank you
> Dewi
> 
> 
> 
> 
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



Re: [PHP-DB] File input from form not detected

2003-05-30 Thread Paul Burney
on 05/30/2003 9:16 AM, Dewi Wahyuni at [EMAIL PROTECTED] appended the following
bits to my mbox:

> if($userfile) it fails. BUT $userfile_name is able to  display the filename .
> 
> With print_f($HTTP_POST_VARS) also the userfile was not displayed, only other
> input element which is Maximum file size is displayed

Hi Dewi,

I think you posted to the wrong list.  You should probably be posting to
PHP-GENERAL.

Have you read through the manual page and all of the comments yet?



Some tips:

- If you are using PHP 4.1 or above, you should probably be looking at the
$_FILES array.

- You must add an encoding type to the form -> enctype="multipart/form-data"

HTH.

Sincerely,

Paul Burney






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