php-general Digest 11 Mar 2011 18:21:39 -0000 Issue 7221

2011-03-11 Thread php-general-digest-help
php-general Digest 11 Mar 2011 18:21:39 - Issue 7221 Topics (messages 311772 through 311773): Re: Issue with Quick Email validation 311772 by: NetEmp Re: [PHP-WEBMASTER] php with htmlspecialchars function 311773 by: Daniel Brown Administrivia: To subscribe to the digest,

php-general Digest 12 Mar 2011 06:21:46 -0000 Issue 7222

2011-03-11 Thread php-general-digest-help
php-general Digest 12 Mar 2011 06:21:46 - Issue 7222 Topics (messages 311774 through 311793): $_POST variable 311774 by: Danny 311775 by: Daniel Brown 311777 by: Steve Staples 311778 by: richard gray 311779 by: Geoff Lane 311781 by: Shawn

[PHP] Re: [PHP-WEBMASTER] php with htmlspecialchars function

2011-03-11 Thread Daniel Brown
On Fri, Mar 11, 2011 at 13:07, Lisa Nguyen lisa.ngu...@jpl.nasa.gov wrote: Hi I use one of your example to test the htmlspecialchars : ?php $new = htmlspecialchars(a href='test'Test/a, ENT_QUOTES); echo $new; // lt;a href=#039;test#039;gt;Testlt;/agt; ? On my browse, it display like

[PHP] $_POST variable

2011-03-11 Thread Danny
Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ? value=0 input type=radio name=?php print

Re: [PHP] $_POST variable

2011-03-11 Thread Daniel Brown
On Fri, Mar 11, 2011 at 14:28, Danny dannydeb...@gmail.com wrote: [snip!] Now, when I submit this form to another page for processing, how would I catch the above radio-button's $_POST name since I do not know the name, only that it starts with radio_ ? One method is a foreach() loop.

[PHP] Possible to pinpoint peak memory usage?

2011-03-11 Thread Daniel Hong
Hello, Is it possible to pinpoint the location where the most memory was used? I log memory_get_peak_usage() in sections of my code where I believe the most memory would be consumed, but I haven't had luck with getting an accurate picture. I also log the peak usage at the very end of the code. I

Re: [PHP] $_POST variable

2011-03-11 Thread Steve Staples
On Fri, 2011-03-11 at 21:28 +0200, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print

Re: [PHP] $_POST variable

2011-03-11 Thread richard gray
On 11/03/2011 20:28, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ? value=0

[PHP] Re: $_POST variable

2011-03-11 Thread Geoff Lane
Hi Danny, On Friday, March 11, 2011, 7:28:10 PM, you wrote: I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print

Re: [PHP] Re: [PHP-WEBMASTER] php with htmlspecialchars function

2011-03-11 Thread NetEmp
Well Lisa, that is exactly the way htmlspecialchars is supposed to work. Here you could also display - Test - without using any function at all, simply echo a href='test'Test/a; and this should work well. NetEmp On Fri, Mar 11, 2011 at 11:51 PM, Daniel Brown danbr...@php.net wrote: On Fri,

[PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ?

Re: [PHP] Possible to pinpoint peak memory usage?

2011-03-11 Thread David Harkness
On Fri, Mar 11, 2011 at 11:35 AM, Daniel Hong dan...@amagineinc.com wrote: Is it possible to pinpoint the location where the most memory was used? Take a look at XHProf. [1] It will track memory and time of all function calls. Paul Reinheimer created a GUI [2] to make dealing with the data

Re: [PHP] Re: $_POST variable

2011-03-11 Thread richard gray
You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2; } } I haven't tried the above code, but I hope

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Jim Lucas
On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 02:33 PM, Jim Lucas wrote: On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of

Re: [PHP] Possible to pinpoint peak memory usage?

2011-03-11 Thread Daniel Hong
Nice. I will give XHProf a try. Thanks! -daniel On Fri, Mar 11, 2011 at 12:04 PM, David Harkness davi...@highgearmedia.comwrote: On Fri, Mar 11, 2011 at 11:35 AM, Daniel Hong dan...@amagineinc.comwrote: Is it possible to pinpoint the location where the most memory was used? Take a look at

[PHP] web site link request

2011-03-11 Thread Kirk Bailey
May I have suggestions of websites I would do well to visit to improve my php skills? Links please, with a breif description if you would be so good. -- end Very Truly yours, - Kirk Bailey, Largo Florida kniht

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Kirk Bailey
On 3/11/2011 2:43 PM, Geoff Lane wrote: [snip] You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2;

[PHP] Zend Framework - getParam() Question

2011-03-11 Thread Dan Joseph
Hi Everyone, Zend Framework getParam question I'm trying to get a value from the url... I know how to grab: http;//www.website.com/index/user/1 that's the index controller, $this-_getParam('user'); (value = 1).. What I'd like to be able to grab is just off one thing from the url...

Re: [PHP] Zend Framework - getParam() Question

2011-03-11 Thread NetEmp
Hi Dan One method for this is to use URL Rewriting (which can be implemented on Apache using htaccess). Through URL Rewriting you can first make the following URL: http://www.website.com/article-clean-url http://www.website.com/article-clean-urlto internally behave as the following:

Re: [PHP] Zend Framework - getParam() Question

2011-03-11 Thread Midhun Girish
You can also try routing in zend.. http://codeutopia.net/blog/2007/11/16/routing-and-complex-urls-in-zend-framework/ Midhun Girish On Sat, Mar 12, 2011 at 11:16 AM, NetEmp net.ser...@gmail.com wrote: Hi Dan One method for this is to use URL Rewriting (which can be implemented on Apache

Re: [PHP] Check for open file

2011-03-11 Thread Tommy Pham
On Fri, Mar 4, 2011 at 7:09 AM, Steve Staples sstap...@mnsi.net wrote: Depending on the size of the file, wouldn't this fall under the 2gb limitation on windows 32bit OS?  I ran into this problem on a project I was working on, and ended up switching to Python (but that is a WHOLE other

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread Tommy Pham
I think the OP is having both PHP JS codes mixed and scattered all over the page. If chunked-encoding used without any ob* implementation, then that's the problem he'll experience. Richard, I recommend to put the $(document).ready() and any JS scriptlets within body/body tags at the very

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread David Hutto
Although, right now, if I were going to be using all of those languages in unison(and I am), then I'd go with C, and spit them out to the browser for lower level control, as well as, to remain familiar with some of the main languages being used currently. -- PHP General Mailing List

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread David Hutto
On Sat, Mar 12, 2011 at 1:21 AM, Tommy Pham tommy...@gmail.com wrote: I think the OP is having both PHP JS codes mixed and scattered all over the page.  If chunked-encoding used without any ob* implementation, then that's the problem he'll experience. Richard, I recommend to put the

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread Tommy Pham
On Fri, Mar 11, 2011 at 10:31 PM, David Hutto smokefl...@gmail.com wrote: On Sat, Mar 12, 2011 at 1:21 AM, Tommy Pham tommy...@gmail.com wrote: I think the OP is having both PHP JS codes mixed and scattered all over the page.  If chunked-encoding used without any ob* implementation, then

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread Tommy Pham
On Fri, Mar 11, 2011 at 10:34 PM, David Hutto smokefl...@gmail.com wrote: Although, right now, if I were going to be using all of those languages in unison(and I am), then I'd go with C, and spit them out to the browser for lower level control, as well as, to remain familiar with some of the

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread David Hutto
On Sat, Mar 12, 2011 at 2:22 AM, Tommy Pham tommy...@gmail.com wrote: On Fri, Mar 11, 2011 at 10:34 PM, David Hutto smokefl...@gmail.com wrote: Although, right now, if I were going to be using all of those languages in unison(and I am), then I'd go with C, and spit them out to the browser for

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread Tommy Pham
On Fri, Mar 11, 2011 at 11:26 PM, David Hutto smokefl...@gmail.com wrote: On Sat, Mar 12, 2011 at 2:22 AM, Tommy Pham tommy...@gmail.com wrote: On Fri, Mar 11, 2011 at 10:34 PM, David Hutto smokefl...@gmail.com wrote: Although, right now, if I were going to be using all of those languages in

Re: [PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-11 Thread David Hutto
On Sat, Mar 12, 2011 at 2:34 AM, Tommy Pham tommy...@gmail.com wrote: On Fri, Mar 11, 2011 at 11:26 PM, David Hutto smokefl...@gmail.com wrote: On Sat, Mar 12, 2011 at 2:22 AM, Tommy Pham tommy...@gmail.com wrote: On Fri, Mar 11, 2011 at 10:34 PM, David Hutto smokefl...@gmail.com wrote: