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
> > > > 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: [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
;" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 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:

[PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
Thanks Colin this will help me, like i said im just trying to help its not my code and i dont work with photos like this, but i Do appreciate your patience with me. "Colin Guthrie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Pieter du Toit wrote: >> That is the problem, i can s

[PHP] Re: Variable post as array

2008-03-05 Thread Colin Guthrie
Pieter du Toit wrote: > That is the problem, i can see the name of the file with $txtPhoto['name'] > but when i use the same with temp_name, i get nothing, one weird thing is > this [error] => 0 [size] => 17008 , what is that? > > this is the code that is giving the problem > $txtPhotoData = ad

[PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
That is the problem, i can see the name of the file with $txtPhoto['name'] but when i use the same with temp_name, i get nothing, one weird thing is this [error] => 0 [size] => 17008 , what is that? this is the code that is giving the problem $txtPhotoData = addslashes(fread(fopen($txtPhoto, "r

[PHP] Re: Variable post as array

2008-03-05 Thread Colin Guthrie
Pieter du Toit wrote: > 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 Dude, just as a general observation, when you are asking for help, don't just describe what you do, post th

[PHP] Re: Variable post as array

2008-03-05 Thread Colin Guthrie
Pieter du Toit wrote: > I ran a print_r on it and this is the results > > Array ( [txtPhoto] => Array ( [name] => g1.jpg [type] => image/pjpeg > [tmp_name] => /tmp/php3qkA4A [error] => 0 [size] => 17008 ) ) > > The image received here must be inserted into a database as binary it looks > like i

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
hat 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:

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

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
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 > Subj

[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 "Colin Guthrie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Pieter du Toit wrote: >> Hi >> >> I have this weird proble

[PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
I ran a print_r on it and this is the results Array ( [txtPhoto] => Array ( [name] => g1.jpg [type] => image/pjpeg [tmp_name] => /tmp/php3qkA4A [error] => 0 [size] => 17008 ) ) The image received here must be inserted into a database as binary it looks like it. "Colin Guthrie" <[EMAIL PROTECTED

Re: [PHP] Re: Variable post as array

2008-03-05 Thread Pieter du Toit
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

[PHP] Re: Variable post as array

2008-03-05 Thread Colin Guthrie
Pieter du Toit wrote: > Hi > > I have this weird problem, when i select a file to upload, the variable > arrives as an array at the action php file, this is the code, and the > variable name is txtPhoto I'd give a shorter example. People don't want to read through all your code.. Also you shou

RE: [PHP] Re: Variable post as array

2008-03-05 Thread Angelo Zanetti
: Variable post as array 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 name. Also with a vardump i can see that temp name is [&