Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-12 Thread Tamara Temple
On Sep 11, 2010, at 12:14 PM, Jason Pruim wrote: On Sep 11, 2010, at 12:39 PM, Tamara Temple wrote: Rather than repeating all that code, I suggest the following: [snip] That's actually what I'm trying to get away from. I was hoping to do it all in HEREDOC syntax. I've always thought it made

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 1:09 PM -0400 9/11/10, Jason Pruim wrote: Hey tedd, Thanks for the response but for this particular project I'm avoiding using anything but standard HTML since it will be used almost exclusively by people using screen readers and other assistive technology so I'm going a little old school

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 11:42 AM -0500 9/11/10, Tamara Temple wrote: The debate on client-side vs. server-side form validation is ongoing. Client-side is more responsive, and attempts to keep bad data from ever reaching your application, but relies on javascript being enabled. Since this is something easily turned

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jim Lucas
Jason Pruim wrote: Hi Tamara, On Sep 11, 2010, at 12:39 PM, Tamara Temple wrote: Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
On Sep 11, 2010, at 1:03 PM, Debbie . wrote: Jason, I don't really understand the responses you got to this email, I have attached the sticky form I made from a book called "PHP Visual Quickstart guide. It uses an if conditional to print a response if the field is empty. If I'm not helpi

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
Hi Tamara, On Sep 11, 2010, at 12:39 PM, Tamara Temple wrote: Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type'] == "event") ?

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
Hey Ash, On Sep 11, 2010, at 10:58 AM, a...@ashleysheridan.co.uk wrote: For a month selector, using a loop to output the months is good, as you can then within the loop check for that value sent and set the selected html attribute for that select element. that's what I was thinking too...

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
On Sep 11, 2010, at 11:55 AM, tedd wrote: At 9:49 AM -0400 9/11/10, Jason Pruim wrote: Hey everyone! Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have... I have a form for submitting an e

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Tamara Temple
The debate on client-side vs. server-side form validation is ongoing. Client-side is more responsive, and attempts to keep bad data from ever reaching your application, but relies on javascript being enabled. Since this is something easily turned off by users, one can't always rely on it to

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Tamara Temple
Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type'] == "event") ? "selected" : '' ?> For a month selector, try: $months = a

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 9:49 AM -0400 9/11/10, Jason Pruim wrote: Hey everyone! Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have... I have a form for submitting an event to a website, and if the form is not subm

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread a...@ashleysheridan.co.uk
For a month selector, using a loop to output the months is good, as you can then within the loop check for that value sent and set the selected html attribute for that select element. I should warn you that your code will throw a warning when no data has been posted to it. Consider using isset(