Re: SELECT with arbitrary input and buttons with values separated from text is possible?

w3c@dv-life.ru schrieb:

> 1. Buttons. Why the value of a button control is equal text on the button?
> I can have 100 button
> with text "Submit" in different pages of my app, but for parsing $_POST
> array in PHP i want different
> names, that can hint me what action exactly PHP script must perform. Why
> it's not possible
> to write <input type=submit name=action_but value=add_user text=submit> ?
> Now i use union of name and value in name, like <input type=submit
> name=action_but_add_user text=submit>,
> and i am compelled to use additional searching by pattern and parsing
> undefined $_POST key, instead of using
> simple check like if ($_POST['action_but']=='add_user').

you should improve you PHP skills ...

and for example use arrays

<input type="submit" name="action[add_user]" value="submit" />

and check for for the keys in the given array



sorry for being OT!

-- 
Sebastian Mendel

www.sebastianmendel.de

Received on Wednesday, 25 April 2007 13:08:04 UTC