PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: CGI/Sybperl in Linux, how?
Date: Nov 5 1997 3:11PM

Jeffrey Yu wrote:
> 
> Hi, after having sybperl installed on my Linux box,
> now I move toward using cgi to work with sybperl.  The
> objective is to access Sybase through a cgi script.
> Last night I typed in a sample cgi downloaded from the
> net, everything runs fine.  But after I added following
> line to it, the script failed.  The line is:
> 
> use Sybase::CTlib;
> 
> Here is the code:
> 
> #!/usr/bin/perl

# Add:

BEGIN {
    $ENV{SYBASE} = '/usr/local/sybase';  # or wherever your sybase
                             # directory is
}


> 
> use CGI qw(:standard);
> #use Sybase::CTlib;
> 
> print header;
> print start_html('A Simple Example'),
>     h1('A Simple Example'),
>     start_form,
>     "What's your name? ",textfield('name'), p, "What's the
> combination?",
>     p, checkbox_group(-name=>'words',
> -values=>['eenie','meenie','minie','moe'],
>                    -defaults=>['eenie','minie']),
>     p, "What's your favorite color? ", popup_menu(-name=>'color',
>                -values=>['red','green','blue','chartreuse']),
>     p, submit, end_form, hr;
> 
> if (param()) {
>     print
>         "Your name is",em(param('name')),
>         p,
>         "The keywords are: ",em(join(", ",param('words'))),
>         p,
>         "Your favorite color is ",em(param('color')),
>         hr;
> }
> print a({href=>'../cgi_docs.html'},'Go to the documentation');
> ===============================================================


Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler