Re: First stupid post of the year.
| From: | tedd | Date: | Wed, 02 Jan 2008 20:04:36 +0000 |
| Subject: | Re: First stupid post of the year. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266513@lists.php.net to get a copy of this message | ||
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