php-general Digest 25 Jun 2011 21:11:42 -0000 Issue 7375

Topics (messages 313716 through 313718):

Re: [PHP-DB] Re: radio form submission
        313716 by: Vitalii Demianets
        313717 by: Vitalii Demianets
        313718 by: Tamara Temple

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
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 least one 
selected radio button (I prefer isset($_POST['store_type']), but that is just 
a matter of taste).
Some debugging can help you. Try insert this:

var_dump($_POST['store_type']);
var_dump($choices);

just before validation if (!array_key_exists(...

HTH

--- End Message ---
--- Begin Message ---
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 but it does not eliminate the need of 
server-side validation.

--- End Message ---
--- Begin Message ---
On Jun 24, 2011, at 1:35 PM, Richard Quadling wrote:
On 24 June 2011 18:23, Tamara Temple <[email protected]> wrote:
On Jun 24, 2011, at 10:28 AM, Richard Quadling wrote:
On 24 June 2011 15:44, Vitalii Demianets <[email protected]> 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 Tables" after I read that one. Randall is one mean mofo.

And because it is so relevant, I added it to the docs...

http://docs.php.net/manual/en/security.database.sql-injection.php

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 :)


--- End Message ---

Reply via email to