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

From: Date: Thu, 30 Jan 2003 11:30:34 +0000
Subject: Re: Using custom "button" form element instead of standard "submit"?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-133628@lists.php.net to get a copy of this message
At 12:18 30-1-2003, you wrote:
sure this would work but it'd be VERY inefficient in my application. It's a file browser application so i have hundreds of folder icons on a page .. the 'submit' element will pass back the name of the button clicked and it would be available immediately/directly, which is what i want. BUT an 'image' element would require me to loop through ALL buttons doing an 'isset' test on each one. * if there is not other data in the form you coudl turn it into an image link and get the value in the $_GET
* else walk through the $_GET vars (each key/value) untill you see a varname that could be what you looked for.
I can't believe html provides no means for using an icon as a submit button. well it does doesn't it?
by the way .. unrelated question ... why would one want to use $_REQUEST['foo'] instead of just $foo? doesn't php give you access to form variables using the latter construct which is much cleaner? not automatically anymore since PHP 4.10.
and the exact reason was that the old way was NOT clean, see the release notes for PHP 4.10 for the details.

« previous php.general (#133628) next »