Re: [PHP-DB] Submit forms

2001-08-13 Thread Ian Grant

Yes, thank you, this works!

Ian.

Paul Burney <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 8/10/01 7:50 AM, Ian Grant at [EMAIL PROTECTED] wrote:
>
> > I've got a simply search form, on my site using PHP and MySQL.
> > It writes a SELECT query  using WHERE ( LIKE '%thingy%') where
thingy
> > is the word entered in the form. It works fine if the submit button is
> > pressed, but if you press return after typing the word, instead, it
fails
> > and writes nothing for the query, so it ends up like WHERE ()
>
> Browsers differ on how they interpret the hitting of the return key and
> which fields get submitted.  I'd guess you have an  name='submit' value='yes'> type field and you are checking isset($submit).
> Some browsers (Netscape on the Mac, for example) won't submit the
name-value
> pair associated with the button.
>
> One solution is to do this instead:
>
> 
> 
>
> No matter how the form is submitted, the submit variable will be set to
yes.
>
> Sincerely,
>
> Paul Burney
>
> ++
> Paul Burney
> Webmaster && Open Source Developer
> UCLA -> GSE&IS -> ETU
> (310) 825-8365
> <[EMAIL PROTECTED]>
> 
> ++
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Submit forms

2001-08-10 Thread Paul Burney

on 8/10/01 7:50 AM, Ian Grant at [EMAIL PROTECTED] wrote:

> I've got a simply search form, on my site using PHP and MySQL.
> It writes a SELECT query  using WHERE ( LIKE '%thingy%') where thingy
> is the word entered in the form. It works fine if the submit button is
> pressed, but if you press return after typing the word, instead, it fails
> and writes nothing for the query, so it ends up like WHERE ()

Browsers differ on how they interpret the hitting of the return key and
which fields get submitted.  I'd guess you have an  type field and you are checking isset($submit).
Some browsers (Netscape on the Mac, for example) won't submit the name-value
pair associated with the button.

One solution is to do this instead:



 
No matter how the form is submitted, the submit variable will be set to yes.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster && Open Source Developer
UCLA -> GSE&IS -> ETU
(310) 825-8365
<[EMAIL PROTECTED]>

++



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Submit forms

2001-08-10 Thread Jon Yaggie


Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code



as i know only IE supports using return to submit.  I have had this problem
 before and never solved it.  it occurs when you ha ve then one form on a
 page normally.  my solution was to use a javascript to  disable the ability
to submit with return.  if there is a better solution lets hear it!


> - Original Message -
> From: "Justin Buist" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 10, 2001 9:33 PM
> Subject: Re: [PHP-DB] Submit forms
>
>
> > I think it'd help if you pasted the HTML code for your form.  Plus,
which
> > browser/OS you're using to test this out would help too.
> >
> > Justin Buist
> > Trident Technology, Inc.
> > 4700 60th St. SW, Suite 102
> > Grand Rapids, MI  49512
> > Ph. 616.554.2700
> > Fx. 616.554.3331
> > Mo. 616.291.2612
> >
> > On Fri, 10 Aug 2001, Ian Grant wrote:
> >
> > > Hi,
> > >
> > > I've got a simply search form, on my site using PHP and MySQL.
> > > It writes a SELECT query  using WHERE ( LIKE '%thingy%') where
> thingy
> > > is the word entered in the form. It works fine if the submit button is
> > > pressed, but if you press return after typing the word, instead, it
> fails
> > > and writes nothing for the query, so it ends up like WHERE ()
> > >
> > >
> > > Any pointers?
> > >
> > > Thanks,
> > >
> > > Ian.
> > >
> > > --
> > >
> > >
> > >
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Submit forms

2001-08-10 Thread Justin Buist

I think it'd help if you pasted the HTML code for your form.  Plus, which
browser/OS you're using to test this out would help too.

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Fri, 10 Aug 2001, Ian Grant wrote:

> Hi,
>
> I've got a simply search form, on my site using PHP and MySQL.
> It writes a SELECT query  using WHERE ( LIKE '%thingy%') where thingy
> is the word entered in the form. It works fine if the submit button is
> pressed, but if you press return after typing the word, instead, it fails
> and writes nothing for the query, so it ends up like WHERE ()
>
>
> Any pointers?
>
> Thanks,
>
> Ian.
>
> --
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]