Re: PHP, HTML Forms & PostgreSQL

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP, HTML Forms & PostgreSQL
Date: 2002-04-08 20:02:56
Message-ID: Pine.LNX.4.21.0204082052570.2690-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 8 Apr 2002, S Dawalt wrote:
>
> 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.

Ok, but once again this is surely relying on browsers 'playing ball'. What
happens if I use a browser that returns the hidden parameter with it's value
whether or not the checkbox is checked, as it should? I'm guessing that since
you mention the order in the form this is actually relying on the browser
returning parameters in the order they occur within the form and the server
providing only the latest definition to the application, the PHP action
page. So what happens if I use a browser which returns parameters in some other
order as one is perfectly entitled to do? What happens if the web server
implements a 'first come first served' parameter setting scheme?

Any, back to the original desire and to keep some what on topic, how about
using a function installed in the DB server to perform the data validation? Or
is the problem that PHP can't provide a null parameter to a function if there
isn't a variable, from the form parameter, defined at the time of the
call? Another or: isn't this also not helping towards the general form handling
idea that is the real aim?

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2002-04-08 20:04:54 Re: Do I just not understand count()?
Previous Message Frank Finner 2002-04-08 19:54:32 Re: Auto Insert date/time