RE: [PHP] First stupid post of the year.

From: Date: Wed, 02 Jan 2008 18:57:21 +0000
Subject: RE: [PHP] First stupid post of the year.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-266483@lists.php.net to get a copy of this message
I often identify each of my submit buttons with different names and identify which one was pressed by; If(isset($_POST["submit1"])) Only one will ever be pressed at a time, and that allows me to use the same page with multiple languages (substituting different values for different languages). As you can see I can ignore the value, and submit buttons are not sent in the form if they are not clicked. Another option, Warren Vail > -----Original Message----- > From: Nathan Nobbe [mailto:quickshiftin@gmail.com] > Sent: Wednesday, January 02, 2008 10:46 AM > To: tedd > Cc: PHP General list > Subject: Re: [PHP] First stupid post of the year. > > On Jan 2, 2008 1:34 PM, tedd <tedd@sperling.com> wrote: > > > Hi gang: > > > > I have a > > > > $submit = $_POST['submit']; > > > > The string contains: > > > > &nbsp; &nbsp; &nbsp; &nbsp;A&nbsp; &nbsp; &nbsp; &nbsp; > > > > (it's there to make a submit button wider) > > > > How can I strip out the "&nbsp;" from the $submit string leaving > > "A"? > > > > I've tried > > > > trim($submit); > > > > but, that don't work. > > > > Neither does: > > > > $submit = str_replace('&nbsp;','',$submit); > > > > or this: > > > > $submit = str_replace(' ';','',$submit); > > > > I should know what to do, but in this case I don't. > > > > Help is always appreciated. > > > why dont you just style the button w/ css? > > style="width:200px" > > -nathan

« previous php.general (#266483) next »