To add to my message, you could:

$buttons = array('sample_a_x', 'sample_b', 'sample_c_x');
$button_pressed = array_intersect($buttons, array_keys($_REQUEST));

If you have everything perfect, i.e. all available buttons are held in the
array, and there are no other input fields in your form that might
name-collide (which wouldn't be good anyway ;->), this will give you an
array with exactly one entry if any of the buttons are clicked, be it an
image (sample_a, sample_c) or a regular (sample_b) button.


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
    ^ http://www.vogelsinger.at/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to