Re: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Gaurav Kumar
Its Simple... Its very obvious that $_POST["color"] is not an array. do something like this and you wil get the values. $arr_color = $_POST["colors"]; //iterate over the array foreach($arr_color as $val) { $str_color .= ", " . $val; } You are done. Gaurav Kumar Teach Lead Open Source Tec

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Andrea Giammarchi
> > echo $_POST['Colors'] . ''; // outputs 'Array' try with echo '', var_dump($_POST['Colors']), ''; to be sure abot the structure. Also, which PHP version? Regards _ Keep your friends

[PHP] Re: avoid Denial of Service

2009-10-09 Thread Peter Ford
Gerardo Benitez wrote: > Hi everybody! > > > I want to get some tips about how avoid a attack of Denial of service. May > be somebody can about your experience with Php o some configuration of > apache, o other software that help in these case. > > > Thanks in advance. > > Unplug the networ

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Andrea Giammarchi
> Its very obvious that $_POST["color"] is not an array. > > do something like this and you wil get the values. > > $arr_color = $_POST["colors"]; > > //iterate over the array > foreach($arr_color as $val) > { > $str_color .= ", " . $val; > } so it's simple, it's not an array, but your a

RE: [PHP] Re: avoid Denial of Service

2009-10-09 Thread Mert Oztekin
PHP is not the right place to find answer to avoid DDoS attack. Your server configuration and firewall software/hardware should try avoiding it (if they can) -Original Message- From: Peter Ford [mailto:p...@justcroft.com] Sent: Friday, October 09, 2009 11:08 AM To: php-general@lists.php

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Andrea Giammarchi
> so it's simple, it's not an array, but your assignment magically makes it an > array since you wrote "iterate over the array" ... very, very clear, isn't it? OK, sarcasm a part, this works perfectly for me, and it's quite obvious Colors IS an array ... Green Yellow Red

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread bearsfoot
Hi Andrea, Thanks for your responses. The output from echo '', var_dump($_POST['Colors']), ''; is --> string(5) "Array" I am using php version 5.2.10. It is strange that you posted the same array and ran the implode function ok ? That has me baffled. I am several forms within the applicat

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread bearsfoot
I just realised I have get_magic_quotes_gpc turned on and was not catering for arrays. Thanks for your time. Adam Andrea Giammarchi-3 wrote: > > > >> so it's simple, it's not an array, but your assignment magically makes it >> an array since you wrote "iterate over the array" ... very, very

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Andrea Giammarchi
> Date: Fri, 9 Oct 2009 02:07:55 -0700 > From: adam.p.reyno...@gmail.com > To: php-general@lists.php.net > Subject: RE: [PHP] Correct handling _POST[] and implode. PHP5 > > > I just realised I have get_magic_quotes_gpc turned on and was not catering > for arrays. > that's why I asked about P

[PHP] Horizontall scrollbars in pdf

2009-10-09 Thread Manoj Singh
Hi, I have a task where I am exporting the report into pdf format through fpdf php library. Report width depends on it's data and it can be large also. My problem is that if the report width is large then instead of showing horizontal scrollbars the report gets truncated. Do you have any idea of h

Re: [PHP] Horizontall scrollbars in pdf

2009-10-09 Thread Ashley Sheridan
On Fri, 2009-10-09 at 15:30 +0530, Manoj Singh wrote: > Hi, > > I have a task where I am exporting the report into pdf format through fpdf > php library. Report width depends on it's data and it can be large also. My > problem is that if the report width is large then instead of showing > horizon

RE: [PHP] Native support to MS SQL Server

2009-10-09 Thread Ashley Sheridan
On Fri, 2009-10-09 at 10:05 +0530, Rakesh Kumar wrote: > Yes correct it will work on old version > > -Original Message- > From: Raymond Irving [mailto:xwis...@yahoo.com] > Sent: Friday, October 09, 2009 9:56 AM > To: php-general@lists.php.net > Subject: [PHP] Native support to MS SQL Se

RE: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread MEM
@LinuxManMikeC and all @All Thanks. I was more or less aware of that possibility, however, please let me share the big picture will you guys: The main point is to access the properties name as well as values, of that object, and put them on a xls file. Instead of using mysql_num_rows, and mysql_n

Re: [Fwd: [PHP] Sessions in databases]

2009-10-09 Thread Jay Ess
Il pinguino volante wrote: (There were some erroros in the previous email, I'm sorry) Hi to all. I have to realize an authentication system for a lot of users. I heard that someone uses to store session states (?) into a database. I'd like to know how and, expecially, WHY to do it and what's

Re: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread Fernando Castillo Aparicio
De: MEM Para: Lester Caine ; php-general@lists.php.net Enviado: vie,9 octubre, 2009 12:40 Asunto: RE: [PHP] Newbie: Array of objects iteration @LinuxManMikeC and all @All Thanks. I was more or less aware of that possibility, however, please let me share the b

RE: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread MEM
>Correct about my example, although I'm not sure if you get each record as an array or as an object. Anyway, you can iterate both. > >And if you want to get the column names, I suppose you could use array_keys() on the first record if you receive an array, or maybe get_object_vars() if it's an >ob

[PHP] Re: Newb question about getting keys/values from a single array element

2009-10-09 Thread Shawn McKenzie
Daevid Vincent wrote: > I feel like a total newb asking this, but I'm just having a brain fart or > something... > > I'm writing a page where I can either get back a list of items: > > Array { > [1233] => "apple", > [6342] => "apricot", > [2345] => "banana", >

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Bastien Koert
> Would this be a good time to troll about the virtues of MySQL over > MSSQL? :p > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > It has virtues? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Ashley Sheridan
On Fri, 2009-10-09 at 09:06 -0400, Bastien Koert wrote: > > Would this be a good time to troll about the virtues of MySQL over > > MSSQL? :p > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > > > > It has virtues? > > -- > > Bastien > > Cat, the other other white meat > W

[PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread kronos
Hi, Would someone be kind enough to test whether these following functions work? I'm getting: "PHP Fatal error: Call to undefined function easter_date() . . . easter_days" on both local and production sites. "; echo date("M-d-Y", easter_date(2009)); print ""; echo da

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Bastien Koert
On Fri, Oct 9, 2009 at 9:11 AM, Ashley Sheridan wrote: > On Fri, 2009-10-09 at 09:06 -0400, Bastien Koert wrote: > > > Would this be a good time to troll about the virtues of MySQL over > > MSSQL? :p > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > > > > It has virtues? > >

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Ashley Sheridan
On Fri, 2009-10-09 at 09:15 -0400, Bastien Koert wrote: > > > > On Fri, Oct 9, 2009 at 9:11 AM, Ashley Sheridan > wrote: > > > On Fri, 2009-10-09 at 09:06 -0400, Bastien Koert wrote: > > > > Would this be a good time to troll about the virtues of MySQL over

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Jonathan Tapicer
What platform? If you compiled PHP yourself you need to compile with --enable-calendar. Jonathan On Fri, Oct 9, 2009 at 10:01 AM, wrote: > Hi, > > Would someone be kind enough to test whether these following functions work? > > I'm getting: "PHP Fatal error:  Call to undefined function easter_d

RE: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread MEM
> Right now, I have something like this: > > foreach ($objRecord as $record) > { > //we will have a new line. > $xls_file .="\n"; > > > foreach ($record as $column=>$value) > { > $xls_file .= $value."\t"; > } > > } > > The only thing I need now, is t

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Paul M Foster
On Fri, Oct 09, 2009 at 09:06:53AM -0400, Bastien Koert wrote: > > Would this be a good time to troll about the virtues of MySQL over > > MSSQL? :p > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > > > > It has virtues? Of course not. He actually meant PostgreSQL, which *does

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Andre Dubuc
Hi Jonathon, I'm using Mandriva 2008.0 x86_64 version (which probably didn't have that enabled).. Thanks -- will check. Be fun trying to enable it though, given Mandriva's propensity to stick stuff in weird places. Sigh . . . Andre On October 9, 2009 09:20:29 am Jonathan Tapicer wrote: > Wha

Re: [PHP] Newb question about getting keys/values from a single array element

2009-10-09 Thread tedd
At 6:08 PM -0700 10/8/09, Daevid Vincent wrote: I feel like a total newb asking this, but I'm just having a brain fart or something... I'm writing a page where I can either get back a list of items: Array { [1233] => "apple", [6342] => "apricot", [2345] =>

[PHP] Re: Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Al
kro...@aolohr.com wrote: Hi, Would someone be kind enough to test whether these following functions work? I'm getting: "PHP Fatal error: Call to undefined function easter_date() . . . easter_days" on both local and production sites. "; echo date("M-d-Y", easter_date(2009)); print "";

RE: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread MEM
Dear all, it's done. Can I call your help for the remain issues please, I'm sure they are easy to explain, and at some extend, common: http://pastebin.com/m691d3e66 Instead of saving to the database, if I do a print_r or a var_dump, I get the charsets quite ok. However, they do not appear proper

RE: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread MEM
Done. print utf8_decode($xls_file); Regards, Márcio > -Original Message- > From: MEM [mailto:tal...@gmail.com] > Sent: sexta-feira, 9 de Outubro de 2009 18:19 > To: 'MEM'; 'Fernando Castillo Aparicio'; 'Lester Caine'; 'php- > gene...@lists.php.net' > Subject: RE: [PHP] Newbie: Array o

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Chris Streatfield
Out put on PHP 5.2.4 Parse error: syntax error, unexpected T_STRING in /testphp.php on line 2 Line 2 is the first line of code. Output on PHP 5.2.6 and on PHP 5.3.0 local blank page. All the best Chris Streatfield Tel: +64 4 475 7846 Mob: 021 102 6018 Skype: chrisstreat On Sat, 10 Oct 2009

[PHP] RE: Newb question about getting keys/values from a single array element

2009-10-09 Thread Daevid Vincent
> -Original Message- > From: Shawn McKenzie [mailto:nos...@mckenzies.net] > Sent: Friday, October 09, 2009 5:32 AM > To: Daevid Vincent > Cc: php-general@lists.php.net > Subject: Re: Newb question about getting keys/values from a > single array element > > Daevid Vincent wrote: > > I

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread kronos
Thanks Chris. Seems like the function is a dud. I have '-enable-calendar' working on both local and production. Sigh . . I have been using another modified 'easter' function, 'pFeast', (can't for the life of me find it on the net now). It works well, but I need to set the output to a variable

Re: [PHP] Fatal error on functions valid for PHP 4, 5

2009-10-09 Thread Shawn McKenzie
kro...@aolohr.com wrote: > Thanks Chris. > > Seems like the function is a dud. I have '-enable-calendar' working on both > local and production. Sigh . . > > I have been using another modified 'easter' function, 'pFeast', (can't for > the > life of me find it on the net now). It works well, b

Re: [PHP] Fatal error on functions valid for PHP 4, 5 [RESOLVED]

2009-10-09 Thread kronos
On October 9, 2009 05:17:18 pm you wrote: > kro...@aolohr.com wrote: > > Thanks Chris. > > > > Seems like the function is a dud. I have '-enable-calendar' working on > > both local and production. Sigh . . > > > > I have been using another modified 'easter' function, 'pFeast', (can't > > for the li

Re: [PHP] Newbie: Array of objects iteration

2009-10-09 Thread Tommy Pham
- Original Message > From: MEM > To: MEM ; Fernando Castillo Aparicio ; > Lester Caine ; php-general@lists.php.net > Sent: Fri, October 9, 2009 6:22:05 AM > Subject: RE: [PHP] Newbie: Array of objects iteration > > > Right now, I have something like this: > > > > foreach ($objRecord as

[PHP] COM Help (hopefully)

2009-10-09 Thread Adam Randall
We have a US postal database called ZP4 that we that we use to scrub client addresses into something useful. For future projects we need to expand on this scrubbing so that we can view counties and such. The scrubbing is currently being performed by a custom application a former employee wrote for