Re: PHP, HTML Forms & PostgreSQL

From: "S Dawalt" <shane(dot)dawalt(at)wright(dot)edu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: PHP, HTML Forms & PostgreSQL
Date: 2002-04-08 19:35:35
Message-ID: 009201c1df34$8e7c78a0$030101df@donet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>
> On Mon, 8 Apr 2002, Martijn van Oosterhout wrote:
>
> > On Mon, Apr 08, 2002 at 12:52:48PM +0200, Leif Jensen wrote:
> > > I have looked in the HTML 4.0 recommendation, which talks about
how
> > > form data is being handled, but it doesn't say anything about how PHP
> > > treats the result.
> >
> > Hmm, I'm not sure then, but this is the way I've always known it to
work.
>
> I've never used PHP but surely the HTML specs. not having anything to say
about
> PHP should not be a surprise? Isn't PHP a scripting language whose only
> connection with HTML is that it is embedded within HTML?

True, PHP is a completely different beast from HTML. The HTML spec will
not talk about it. Go to www.php.net and look at the manual. There's lots
of good info there.

Insofar as return values, you can use the "value=" clause of the checkbox
to return whatever value you want when it has been "checked". If you want
the checkbox to return something when it hasn't been checked, then prior to
defining the checkbox, define a hidden type of the same name as your
checkbox, but place the "unchecked" value in it. If the checkbox isn't
checked then your default value gets returned by the browser, otherwise the
value specified within the checkbox definition is returned. I think I
found this on the PHP website several months ago. It works quite well.

Shane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-04-08 19:38:23 Re: vacuuming not working?
Previous Message Tom Lane 2002-04-08 19:30:41 Re: Do I just not understand count()?