-- Robert <catcher@xxxxxxxxxxxxx> wrote
(on Friday, 13 August 2004, 09:41 AM -0400):
> my form code:
>
> <form name="frm" action="index.pl" method="post">
> <input type="hidden" name="rm" value="insert">
> <table summary="holds the input ticket form">
> <tr>
> <td class="rtAlign">Remedy#:</td>
> <td><input type="text" name="remedy_ticket" value="<TMPL_VAR
> NAME=REMEDY_TICKET>" /></td>
> </tr>
> <tr>
> <td class="rtAlign">Received:</td>
> <td><input type="text" name="date_received" value="<TMPL_VAR
> NAME=DATE_RECEIVED>" /> format: 08-JUN-04</td>
> </tr>
> <tr>
> <td class="rtAlign">Customer:</td>
> <td><input type="text" name="customer_name" value="<TMPL_VAR
> NAME=CUSTOMER_NAME>" /></td>
> </tr>
> <tr>
> <td class="rtAlign">Phone#:</td>
> <td><input type="text" name="phone_number" value="<TMPL_VAR
> NAME=PHONE_NUMBER>" /> format: 305-292-8814</td>
> </tr>
> <tr>
> <td class="rtAlign">Email:</td>
> <td><input type="text" "email_address" value="<TMPL_VAR
> NAME=EMAIL_ADDRESS>" /></td>
> </tr>
> <tr>
> <td> </td>
> <td><button type="submit" value="Submit
> Form">Submit</button> <button type="reset">Reset</button></td>
> </tr>
> </table>
> </form>
>
> My C-A code:
>
> sub insert_ticket {
> my $self = shift;
> my $q = $self->query();
>
> # form information
> my $remedy_number = $q->param('REMEDY_NUMBER');
> my $date_received = $q->param('DATE_RECEIVED');
> my $customer_name = $q->param('CUSTOMER_NAME');
> my $phone_number = $q->param('PHONE_NUMBER');
> my $email_address = $q->param('EMAIL_ADDRESS');
The element name you're requesting doesn't match the case of the element
name in the form. For example, in the form, you have an input element
named 'date_received', but you're trying to grab one named
'DATE_RECEIVED' with the param() method from CGI.pm. (CGI::Application's
param() method is case-insenstive, but CGI.pm's is not, as HTML element
names are case-insensitive.)
--
Matthew Weier O'Phinney
http://weierophinney.net/matthew/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|