[ic] How to use value from text input box in perl block
Peter
peter at pajamian.dhs.org
Wed May 27 00:16:00 UTC 2009
On 05/26/2009 04:46 PM, IC wrote:
>>> Hi folks,
>>>
>>> I am stuck on how to take the value from a text input box and use it as
>> a
>>> variable in a perl block, I want to enter an order number into a box and
>> use
>>> it as part of a perl sql query, I know this is simple for the gurus but
>> I am
>>> stuck....
>> [perl transactions orderline]
>> my ($tdb, $odb) = @Db{qw{transactions orderline}};
>> my $order_number = $tdb->quote($CGI->{order_number});
>>
>> my $sql = "SELECT * from transactions where order_number = $order_number";
>>
>> my $results = $tdb->query($sql);
>>
>> # do something with $results
>>
>> return;
>> [/perl]
>
> Hi Peter,
>
> I presume the input box needs a value="[cgi order_number]" to make this
> work, this is what I tried but I get this message:-
No, the input box would need a name="order_number".
> Safe: 'require' trapped by operation mask at
> /usr/local/interchange/lib/Vend/Table/DBI.pm line 1987.
This is not coming from the above code. Or if it is Interchange has a
pretty serious bug that we need to know about.
Peter
More information about the interchange-users
mailing list