Re: Using custom "button" form element instead of standard "submit"?

From: Date: Thu, 30 Jan 2003 12:28:37 +0000
Subject: Re: Using custom "button" form element instead of standard "submit"?
Groups: php.general 
Request: Send a blank email to php-general+get-133634@lists.php.net to get a copy of this message
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/

« previous php.general (#133634) next »