Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-07-01 Thread Tamara Temple
There must some place for this one: http://xkcd.com/231/ Maybe something near the mailing lists info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-29 Thread Tamara Temple
On Jun 27, 2011, at 7:18 AM, Steve Staples wrote: On Sat, 2011-06-25 at 16:11 -0500, Tamara Temple wrote: On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote: On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-29 Thread Richard Quadling
On 29 June 2011 08:37, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 27, 2011, at 7:18 AM, Steve Staples wrote: On Sat, 2011-06-25 at 16:11 -0500, Tamara Temple wrote: On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote: On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-27 Thread Richard Quadling
On 25 June 2011 22:11, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote: On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24 June 2011 15:44, Vitalii Demianets

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-27 Thread Steve Staples
On Sat, 2011-06-25 at 16:11 -0500, Tamara Temple wrote: On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote: On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24 June 2011 15:44, Vitalii Demianets

Re: Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-27 Thread Tim Streater
On 27 Jun 2011 at 13:18, Steve Staples sstap...@mnsi.net wrote: On Sat, 2011-06-25 at 16:11 -0500, Tamara Temple wrote: Well played, sir, well played. I think we should go through all the xkcd comics that relate to programming somehow and insert them in the php.net documentation :)

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-25 Thread Vitalii Demianets
On Friday 24 June 2011 21:44:05 Chris Stinemetz wrote: if (!array_key_exists($_POST['store_type'], $choices)) {    echo You must select a valid choice.; Nothing wrong to me. Perfectly valid way of checking if there is at

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-25 Thread Vitalii Demianets
On Saturday 25 June 2011 01:24:10 Andre Polykanine wrote: Maybe I'm off topic, but wouldn't you consider JavaScript form validation? That will make your task easier and the user will see his/her error much earlier, before he/she submits the form. JavaScript validation is useful

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-25 Thread Tamara Temple
On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote: On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24 June 2011 15:44, Vitalii Demianets vi...@nppfactor.kiev.ua wrote: And furthermore, I think Carthage must be

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-25 Thread Tamara Temple
On Jun 24, 2011, at 1:44 PM, Chris Stinemetz wrote: radio select validation What I am doing wrong? I want to make sure a radio button is selected, but my current code allows insertion even when radio button isn't selected. At the risk of repeating myself: From: Tamara Temple

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-25 Thread Tamara Temple
On Jun 24, 2011, at 2:20 PM, Jim Giner wrote: Call me backwards, but I prefer to keep my statements simple. I would first obtain the POST value before trying to pull up an array element. $stype=$_POST[''store_type']; if (!isset($stype)) (handle missing radio button) else

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Chris Stinemetz
That worked perfectly! Thank you, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Vitalii Demianets
On Friday 24 June 2011 17:28:08 Chris Stinemetz wrote: That worked perfectly! And will work, until you decide to put quotes in button name for some reason. And until some malicious user forge POST request with $_POST['post_tptest'] = '; DROP DATABASE; -- But you can use prepared statements to be

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Richard Quadling
On 24 June 2011 15:44, Vitalii Demianets vi...@nppfactor.kiev.ua wrote: On Friday 24 June 2011 17:28:08 Chris Stinemetz wrote: That worked perfectly! And will work, until you decide to put quotes in button name for some reason. And until some malicious user forge POST request with

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Tamara Temple
On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24 June 2011 15:44, Vitalii Demianets vi...@nppfactor.kiev.ua wrote: And furthermore, I think Carthage must be destroyed. Let's haul out the PHP war wagons! http://xkcd.com/327/ I so wanted to rename my daughter Little Chelsea

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Richard Quadling
On 24 June 2011 18:23, Tamara Temple tamouse.li...@gmail.com wrote: On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote: On 24 June 2011 15:44, Vitalii Demianets vi...@nppfactor.kiev.ua wrote: And furthermore, I think Carthage must be destroyed. Let's haul out the PHP war wagons!

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Chris Stinemetz
radio select validation What I am doing wrong? I want to make sure a radio button is selected, but my current code allows insertion even when radio button isn't selected. My code is: //Generating radio buttons for store type with array

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Jim Giner
Call me backwards, but I prefer to keep my statements simple. I would first obtain the POST value before trying to pull up an array element. $stype=$_POST[''store_type']; if (!isset($stype)) (handle missing radio button) else $st_name=$choices[$stype]; for me (and the next guy who has

Re: [PHP] Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Andre Polykanine
Hello Chris, Maybe I'm off topic, but wouldn't you consider JavaScript form validation? That will make your task easier and the user will see his/her error much earlier, before he/she submits the form. -- With best regards from Ukraine, Andre Skype: Francophile My blog: