RE: [PHP] global array

2012-06-15 Thread ma...@behnke.biz
Jeff Burcher j...@allredmetal.com hat am 14. Juni 2012 um 14:23 geschrieben: You're a genius!! Thank you. Uppercase 'R', sheesh. PHP is sooo picky. I worked for two days trying to figure that one out. Anyway, for future reference, you can pass the entire array as a variable like that?? and

[PHP] Re: php form action breaks script

2012-06-15 Thread Al
On 6/14/2012 7:28 PM, Tim Dunphy wrote: Hello list, I was just wondering if I could get some opinions on a snippet of code which breaks a php web page. First the working code which is basically an html form being echoed by php: if ($output_form) { echo 'br /br /form

Re: [PHP] Re: php form action breaks script

2012-06-15 Thread ma...@behnke.biz
Al n...@ridersite.org hat am 15. Juni 2012 um 14:29 geschrieben: On 6/14/2012 7:28 PM, Tim Dunphy wrote: However if I change the form action to this, it breaks the page resulting in a white screen of death: error_reporting(E_ALL); ini_set('display_errors', 'On'); And what is the error

[PHP] Re: php form action breaks script

2012-06-15 Thread Jim Giner
Hear, Hear for heredocs. The only way to code up your html. Took me a few months to discover it and haven't looked back since. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php form action breaks script

2012-06-15 Thread Jim Lucas
On 06/15/2012 06:35 AM, Jim Giner wrote: Hear, Hear for heredocs. The only way to code up your html. Took me a few months to discover it and haven't looked back since. The only problem I have with HEREDOC is I cannot use constants within them. -- Jim Lucas http://www.cmsws.com/

Re: [PHP] Re: php form action breaks script

2012-06-15 Thread ma...@behnke.biz
Jim Lucas li...@cmsws.com hat am 15. Juni 2012 um 18:39 geschrieben: On 06/15/2012 06:35 AM, Jim Giner wrote: Hear, Hear for heredocs. The only way to code up your html. Took me a few months to discover it and haven't looked back since. The only problem I have with HEREDOC is I

Re: [PHP] Re: php form action breaks script

2012-06-15 Thread Al
It is a small price to pay for large block, especially if the text has any quotes. Personally, I can't keep them straight and delimit them, etc. Heredoc saves all that such stuff. $insert= MY_DEFINED; echo hdc This is my $insert hdc; On 6/15/2012 12:39 PM, Jim Lucas wrote: On 06/15/2012

[PHP] else if vs switch

2012-06-15 Thread April Mains
I have 25 cities and am currently using the following to set the $toaddress for submitting student pre-registration forms based on the city selected: if ($city == Calgary) { $toaddress = abc@emailaddress; } elseif ($city == Brooks) { $toaddress = def@emailaddress; and so on. Would

Re: [PHP] else if vs switch

2012-06-15 Thread Joshua Kehn
Way easier to just use a map. $mapping = array( 'Calgary' = abc@emailaddress, 'Brooks' = def@emailaddress, // etc ); $toaddress = $mapping[$city]; Regards, –Josh Joshua Kehn | @joshkehn http://joshuakehn.com On Jun 15, 2012, at 6:20

Re: [PHP] else if vs switch

2012-06-15 Thread April Mains
Ah yes that's it. Thank you for your help. Have a good weekend. April On 2012-06-15, at 4:29 PM, Joshua Kehn wrote: Way easier to just use a map. $mapping = array( 'Calgary' = abc@emailaddress, 'Brooks' = def@emailaddress, // etc ); $toaddress = $mapping[$city];

Re: [PHP] else if vs switch

2012-06-15 Thread James Yerge
On 06/15/2012 06:44 PM, April Mains wrote: Ah yes that's it. Thank you for your help. Have a good weekend. April On 2012-06-15, at 4:29 PM, Joshua Kehn wrote: Way easier to just use a map. $mapping = array( 'Calgary' = abc@emailaddress, 'Brooks' = def@emailaddress, //