Re: [PHP] Re: Variable post as array

2008-03-07 Thread Richard Lynch
Are you really using temp_name when you want tmp_name? On Wed, March 5, 2008 4:37 am, Pieter du Toit wrote: > Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it > tells > me that temp_name is also an array, but when i echo > $_FILES['txtPhoto']['name'] it gives me the correct na

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Zoltán Németh
2008. 03. 5, szerda keltezéssel 13.42-kor Pieter du Toit ezt írta: > This is line 49 > > $txtPhotoData = addslashes(fread(fopen($txtPhoto, "r"), > filesize($txtPhoto))); add this before: $txtPhoto = $_FILES['txtPhoto']['tmp_name']; and don't use addslashes but rather mysql_real_escape_string or

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Jim Lucas
Pieter du Toit wrote: Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it tells The above reference is wrong. 'temp_name' should be 'tmp_name' me that temp_name is also an array, but when i echo $_FILES['txtPhoto']['name'] it gives me the correct name. Also with a vardump

Re: [PHP] Re: Variable post as array

2008-03-05 Thread M. Sokolewicz
And you don't do: $txtPhotoData = addslashes(fread(fopen($_FILES['txtPhoto']['tmp_name'], "r"), filesize($_FILES['txtPhoto']['tmp_name']))); because ? - Tul P.S. if you want more readable code (PHP >= 4.3.0, which you should have anyway) use: $txtPhotoData = file_get_contents($_FILES['

RE: [PHP] Re: Variable post as array

2008-03-05 Thread Angelo Zanetti
] Sent: 05 March 2008 13:43 To: php-general@lists.php.net Subject: Re: [PHP] Re: Variable post as array This is line 49 $txtPhotoData = addslashes(fread(fopen($txtPhoto, "r"), filesize($txtPhoto))); the $txtPhoto is the parameter ""Angelo Zanetti"" <[EMAIL P

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
This is line 49 $txtPhotoData = addslashes(fread(fopen($txtPhoto, "r"), filesize($txtPhoto))); the $txtPhoto is the parameter ""Angelo Zanetti"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is on line 49? > > What variable are you passing as the parameter? > > > > -Or

RE: [PHP] Re: Variable post as array

2008-03-05 Thread Angelo Zanetti
What is on line 49? What variable are you passing as the parameter? -Original Message- From: Pieter du Toit [mailto:[EMAIL PROTECTED] Sent: 05 March 2008 13:36 To: php-general@lists.php.net Subject: [PHP] Re: Variable post as array This is my problem Warning: fopen() expects paramete

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
This is my problem Warning: fopen() expects parameter 1 to be string, array given in /usr/www/users/zululr/marketplace/myzululand/specials_proc.php on line 49 ""Angelo Zanetti"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Have you tried print_r($_FILES); to see all the values

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
I ran it, and here is the output Array ( [txtPhoto] => Array ( [name] => g1.jpg [type] => image/pjpeg [tmp_name] => /tmp/php3qkA4A [error] => 0 [size] => 17008 ) ) ""Angelo Zanetti"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Have you tried print_r($_FILES); to see all the va

RE: [PHP] Re: Variable post as array

2008-03-05 Thread Angelo Zanetti
Have you tried print_r($_FILES); to see all the values in the variable? Its difficult to see whats going on as you posted your whole file. -Original Message- From: Pieter du Toit [mailto:[EMAIL PROTECTED] Sent: 05 March 2008 12:38 To: php-general@lists.php.net Subject: [PHP] Re: Variab