Re: [PHP] fixing new lines from in an email?

2009-06-26 Thread WenDong Zhang
how about preg_replace('/(\\n}\\r\\n)/', '', $_POST["problem"]); On Sat, Jun 27, 2009 at 12:50 AM, Adam Williams wrote: > > > Daniel Brown wrote: > >>In a cursory glance, I've noticed the following code: >> >> htmlspecialchars(nl2br(str_replace('\r','',$_POST["problem"]))) >> >>You are us

Re: [PHP] PHP 5.2.9 Apache 2.2.11 outputs php code on Vista

2009-06-26 Thread ioan...@btinternet.com
I meant httpd.conf. And what is it about Vista that when in Notepad and you save a file, say test.php in directory htdocs, it shows test.php in the folder, but when you go to Windows Explorer there it is and it is gone? Nor does it load as http://localhost/test.php although http://localhost/

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Paul M Foster
On Fri, Jun 26, 2009 at 09:48:06AM -0400, Daniel Brown wrote: > On Fri, Jun 26, 2009 at 09:43, Tom Worster wrote: > > On 6/26/09 9:20 AM, "Michelle Konzack" > > wrote: > > > >> ...and no one care about the foreign (european) sniper WHO  killed  Neda > >> in Iran. > > > > i don't know why you'd th

Re: [PHP] Re: XSS Preventing.

2009-06-26 Thread Bastien Koert
On Fri, Jun 26, 2009 at 12:07 PM, Chris Shiflett wrote: > On Jun 23, 2009, at 10:29, Martin Zvarík wrote: > >>> Don't htmlentiies() before DB save.  In general: >>> - mysql_real_escape_string() before DB insertion >>> - htmlentities() before dispaly >> >> I, on the other hand, would do htmlentities

[PHP] PHP 5.2.9 Apache 2.2.11 outputs php code on Vista

2009-06-26 Thread ioan...@btinternet.com
I have a working apache 2.2.11 server and php 5.2.9 installed. APACHE CONFIGURATION Files are in: C:/Program Files/Apache Software Foundation/Apache2.2/ Apache https.conf is amended to add at the end of the LoadModule lines (not between any tags): LoadModule php5_module "C:/PHP/php5apache2

Re: [PHP] fixing new lines from in an email?

2009-06-26 Thread Adam Williams
Daniel Brown wrote: In a cursory glance, I've noticed the following code: htmlspecialchars(nl2br(str_replace('\r','',$_POST["problem"]))) You are using a literal '\r' in your str_replace() function. This should instead be replaced with double quotes to translate the \r to its appropr

Re: [PHP] fixing new lines from in an email?

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 12:27, Adam Williams wrote: > I have staff fill out a form that contains a with their problem > description and emailed to me when they click submit.  Staff will press > enter in the text area, but I'm having problems converting the \r\n into a > new line in the email that

[PHP] fixing new lines from in an email?

2009-06-26 Thread Adam Williams
I have staff fill out a form that contains a with their problem description and emailed to me when they click submit. Staff will press enter in the text area, but I'm having problems converting the \r\n into a new line in the email that is sent to me, here is the code: $subject = "new suppor

[PHP] Image Type BMP @ "Save Image As" Dialog on IE

2009-06-26 Thread Nitsan Bin-Nun
I have wrote a PHP script that serves JPEG images in smaller size, the resize is done using GD on-the-fly. I have noticed an interesting issue during the "save image as..." dialog on serveral internet explorer browsers, somehow, for some strange reason, the JPEG file is shown as BMP file. I don't

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread tedd
At 11:46 AM -0400 6/26/09, Daniel Brown wrote: On Fri, Jun 26, 2009 at 11:42, tedd wrote: Well, at least I had a mother. :-) Mrs. Sperling, Tedd's hurting my feelings Mom... he hurt my feeling first! And his mother doesn't dress him as well as you do me. -- --- http://sperli

Re: [PHP] Re: XSS Preventing.

2009-06-26 Thread Chris Shiflett
On Jun 23, 2009, at 10:29, Martin Zvarík wrote: Don't htmlentiies() before DB save. In general: - mysql_real_escape_string() before DB insertion - htmlentities() before dispaly I, on the other hand, would do htmlentities() BEFORE insertion. Pros: --- The text is processed once and doesn't ha

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 11:42, tedd wrote: > > Well, at least I had a mother.  :-) Mrs. Sperling, Tedd's hurting my feelings -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive managem

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread tedd
At 11:22 AM -0400 6/26/09, Daniel Brown wrote: On Fri, Jun 26, 2009 at 11:17, tedd wrote: I stand corrected. Actually, I stand leaning a little to the right. And your mother dresses you funny. ;-P Well, at least I had a mother. :-) tedd -- --- http://sperling.com http://ancien

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 11:17, tedd wrote: > > I stand corrected. Actually, I stand leaning a little to the right. And your mother dresses you funny. ;-P -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed ser

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread tedd
At 10:49 AM -0400 6/26/09, Daniel Brown wrote: The compression algorithm used for encoding, frequency and quality of the file, and actual noise signature itself would throw this off. For example, a file with seven notes played in a period of 8 seconds will be larger than a file with one note

Re: [PHP] OT mysql pivot table problem

2009-06-26 Thread Shawn McKenzie
Matt Giddings wrote: > Ummm yeah, its going to take me a while to wrap my head around that one. > thanks though! > Matt -- Matt Giddings Web Programmer Information Technology Services Saginaw Valley State University Phone: 989.964.7247 http://www.svsu.edu I was born in Saginaw, Michigan. I gre

Re: [PHP] OT mysql pivot table problem

2009-06-26 Thread Matt Giddings
Ummm yeah, its going to take me a while to wrap my head around that one. thanks though! Matt On Thu, Jun 25, 2009 at 5:07 PM, Andrew Ballard wrote: > On Thu, Jun 25, 2009 at 4:21 PM, Andrew Ballard wrote: > > On Thu, Jun 25, 2009 at 3:20 PM, Matt Giddings wrote: > >> I know this is the off topi

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Tom Chubb
2009/6/26 Gautam Bhatia : > hello all, >             Is there anyway in php by which i can get the total play > time of a mp3 , I found some information while doing the google thing > using some 3rd party plug ins like getID3 but without any luck, Any help > in this case would be helpful. Thank you

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Robert Cummings
tedd wrote: At 10:02 AM +0530 6/26/09, Gautam Bhatia wrote: hello all, Is there anyway in php by which i can get the total play time of a mp3 , I found some information while doing the google thing using some 3rd party plug ins like getID3 but without any luck, Any help in this case

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 10:43, tedd wrote: > > I think that play time would be proportional to file size, right? > > If so, then take two files and play them. Note the play times and file sizes > of both and work out a algorithm. That would be the way I would try to solve > it. The compression

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread tedd
At 10:02 AM +0530 6/26/09, Gautam Bhatia wrote: hello all, Is there anyway in php by which i can get the total play time of a mp3 , I found some information while doing the google thing using some 3rd party plug ins like getID3 but without any luck, Any help in this case would be hel

RE: [PHP] This Friday's OT Thread

2009-06-26 Thread Arno Kuhl
-Original Message- From: Michelle Konzack [mailto:linux4miche...@tamay-dogan.net] Sent: 26 June 2009 03:20 PM To: php-general@lists.php.net Subject: Re: [PHP] This Friday's OT Thread ...and no one care about the foreign (european) sniper WHO killed Neda in Iran. Note: I can not reach

Re: [PHP] Regarding Accesing mp3 with php

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 00:32, Gautam Bhatia wrote: > hello all, >             Is there anyway in php by which i can get the total play > time of a mp3 , I found some information while doing the google thing > using some 3rd party plug ins like getID3 but without any luck, Any help > in this case w

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Daniel Brown
On Fri, Jun 26, 2009 at 09:43, Tom Worster wrote: > On 6/26/09 9:20 AM, "Michelle Konzack" > wrote: > >> ...and no one care about the foreign (european) sniper WHO  killed  Neda >> in Iran. > > i don't know why you'd think that. the story is all over the news. american > pols have been exploiting

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Tom Worster
On 6/26/09 9:20 AM, "Michelle Konzack" wrote: > ...and no one care about the foreign (european) sniper WHO killed Neda > in Iran. i don't know why you'd think that. the story is all over the news. american pols have been exploiting it. cnn reports cia hay have been behind the shooting. --

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Michelle Konzack
...and no one care about the foreign (european) sniper WHO killed Neda in Iran. Note: I can not reach my Company Website in Tehran nor can I reach my Office over fixed telephone lines. I can not even contact one of my 57 employees privately. No one has tried to access

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Bastien Koert
2009/6/26 Robert Cummings : > :( > > > > Tom Worster wrote: >> >> and Kaleem Omar. >> >> and 15 people in Baghdad when motorcycle loaded with nails and >> ball-bearings >> exploded in a crowded bazaar. >> >> >> >> On 6/26/09 4:27 AM, "Robert Cummings" wrote: >> >>> Farah Fawcett has also died. I g

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Robert Cummings
:( Tom Worster wrote: and Kaleem Omar. and 15 people in Baghdad when motorcycle loaded with nails and ball-bearings exploded in a crowded bazaar. On 6/26/09 4:27 AM, "Robert Cummings" wrote: Farah Fawcett has also died. I guess you gotta go sometime :| Björn Bartels wrote: Hello fello

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Tom Worster
and Kaleem Omar. and 15 people in Baghdad when motorcycle loaded with nails and ball-bearings exploded in a crowded bazaar. On 6/26/09 4:27 AM, "Robert Cummings" wrote: > Farah Fawcett has also died. I guess you gotta go sometime :| > > Björn Bartels wrote: >> Hello fellow coders... >> >> T

Re: [PHP] This Friday's OT Thread

2009-06-26 Thread Robert Cummings
Farah Fawcett has also died. I guess you gotta go sometime :| Björn Bartels wrote: Hello fellow coders... THE 'KING OF POP' IS DEAD ! Tonight (here in Germany), Mr. Michael Joseph Jackson, also known as 'the king of pop', died on heart failure in the age of 50. I just want to express my

Re: [PHP] How to sort a two-D ARRAY

2009-06-26 Thread Isataev Volodymir
On Thursday 25 June 2009 21:38:24 Ashley Sheridan wrote: > On Wed, 2009-06-24 at 15:23 -0700, salmarayan wrote: > > Can Anyone tell me how to sort two D Array in Descending Order > > for example like this one based on the gain > > Array ( [0] => Array ( [company_name] =>X [gain] => 0.2 ) [1] => Arr

Re: [PHP] Re: idiot proofing

2009-06-26 Thread Manuel Lemos
Hello, on 06/24/2009 09:24 PM Shawn McKenzie said the following: >> What about placing the contents in different divs and showing hiding >> those divs on submit? Then using AJAX to update the server / database >> with the requested operation? >> > That's a good one, however I'm assuming you haven'