At 1:29 PM -0600 1/2/08, Jack Mays wrote:
Just so we have all the info, why are you wanting to do this? Why
not just have the button text be what you want it instead of trying
to do manipulation on it's value?
Why?
It was just a mistaken assumption that I could not style a submit
button and instead used 's to make the button wider. After
which, I would simply remove the spaces before submitting them to a
switch/case condition.
There is nothing wrong with my logic, it was an error in my css.
People use submit buttons lot's of different ways and there is no one
correct way. But, as far as I am concerned, the value of a submit
button is what I'm after, so doing something like this:
<input type="submit" class="button" name="submit" value="A">
<input type="submit" class="button" name="submit" value="B">
...
followed by:
$submit = $_POST['submit'];
switch $submit
{
case 'A':
do something;
break;
case 'B':
do something else;
break;
...
}
is a good way to handle user input. I see no fault in logic.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php