Re: [PHP] Issue with Quick Email validation

2011-03-11 Thread NetEmp
Great Going Bob! Wishing you Lots of Fun ahead! Cheers NetEmp On Fri, Mar 11, 2011 at 12:54 AM, wrote: > Yep, new to programming and starting with php > -taken classes but don't have the experience yet > > Not asking for complete mail addresses probably work best in most > companies, but we'

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

2011-03-11 Thread Daniel Brown
On Fri, Mar 11, 2011 at 13:07, Lisa Nguyen wrote: > Hi > > I use one of your example to test the htmlspecialchars : > > $new = htmlspecialchars("Test", ENT_QUOTES); > echo $new; // Test > ?> > > On my browse, it display like below > Test > > Instead: > Test > > Please help me h

[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: " value="0"> " value="1"> Now, when I submit this form to another page for processing, how would I "catch" th

Re: [PHP] $_POST variable

2011-03-11 Thread Daniel Brown
On Fri, Mar 11, 2011 at 14:28, Danny 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. $v) {

[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 c

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: > > " > value="0"> > " > value="1"> > > Now, when

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: " value="0"> " value="1"> Now, when I submit this form to another page fo

[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: > " > value="0"> > " > value="1"> > Now, when I sub

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 "Test"; and this should work well. NetEmp On Fri, Mar 11, 2011 at 11:51 PM, Daniel Brown wrote: > On Fri, Mar 11, 2011 at 13:07, Lisa Ngu

[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: > > " > value="0"> > " > value="1"> > > Now, when I submit t

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 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 easier. Peace, David [

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 hop

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: >> >> " >> v

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

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 wrote: > On Fri, Mar 11, 2011 at 11:35 AM, Daniel Hong 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 ti

[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... examp

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 to internally behave as the following: http://w

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 wrote: > Hi Dan > > One method for this is to use URL Rewriting (which can be implemented on > Apache using htaccess). >

Re: [PHP] Check for open file

2011-03-11 Thread Tommy Pham
On Fri, Mar 4, 2011 at 7:09 AM, Steve Staples 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 conversation) > >

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 tags at the very bottom of the

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 (http://www.p

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 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 $(document).ready

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 wrote: > On Sat, Mar 12, 2011 at 1:21 AM, Tommy Pham 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

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 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 main languages bei

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 wrote: > On Fri, Mar 11, 2011 at 10:34 PM, David Hutto 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,

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 wrote: > On Sat, Mar 12, 2011 at 2:22 AM, Tommy Pham wrote: >> On Fri, Mar 11, 2011 at 10:34 PM, David Hutto 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

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 wrote: > On Fri, Mar 11, 2011 at 11:26 PM, David Hutto wrote: >> On Sat, Mar 12, 2011 at 2:22 AM, Tommy Pham wrote: >>> On Fri, Mar 11, 2011 at 10:34 PM, David Hutto wrote: Although, right now, if I were going to be using all of those langua