Hi David,
I don't quite understand this one. If your script works when the form
is submitted, then your server/cgi-bin/perl seem to be set up correctly.
Does the same CGI generate the form and accept it back? If so, then
them problem is in your CGI's logic. I do the same thing here, and
right at the top I check to see if the form's submit button's field
exists. If not, then the CGI's called for the first time and I simply
generate the form and exit.
If the submit button data does exist, then it's responding to the form,
at which point I validate the form details. Only after validating the
data do I call the DB update routeines.
If the CGI is not used to create the form in the first place, then I
have no idea why it's getting called when someone clicks the refresh
button.
Gary
On Wednesday 06 June 2001 8:16 pm, David Draley wrote:
> is there a way to call a perl sub routines using a FORM when a
> "submit" button is clicked?
>
> I am trying to push data to a mySQL database table and when my form
> is loaded into the browser or is "refreshed" the browser runs through
> my cgi script and pushes "null" values to the table. Once the form
> is filled and the user clicks the form "submit button" the form works
> and pushes the correct values.
>
>
> thanks
> david
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000