oops, I meant to type Perl for 4 weeks, I am using
version Perl 5.6.0
--- Michael Ayres <[EMAIL PROTECTED]> wrote:
> Hi Paco,
>
> If I could make a suggestion... I think you'll be
> much happier using a
> newer version of perl than 4. With perl 5 and up
> you get to use the
> wonderful features of DBI (Perl's database interface
> module) and DBD
> (database drivers such as the one for Mysql). Not
> without saying you'll
> get to use hundreds of other modules as well,
> including ones to help you
> with your cgi interface.
>
> Really, consider switching to Perl 5 or later...
>
> Good Luck,
> Michael
>
>
> At 12:26 PM 11/2/2001 -0800, paco anubis wrote:
> >Hello,
> >I started learning Perl 4 weeks ago and mysql 3
> days
> >ago so I know that I am in over my head, but here
> goes
> >nothing. I am trying to build a Perl CGI
> application
> >(using DBI) to pass form contents from a web page
> >directly into a MySql database.
> > I don't know how to pass the Perl variable from
> the
> >form into the database. I tried to assign the value
> >using the following code (where "$feilds{user}" is
> the
> >Perl variable to pass):
> >
> >$userdb=$dbh->($feilds{user});
> >
> >$rows=$dbh->do
> > ("INSERT INTO bandbook (user, ect, ect...)
> > VALUES ($userdb, 'ect', 'ect',
> ...)")
> > || die "fucked up inserting data: $DBI::errstr";
> >
> >print "$rows row succesfully added to bandbook\n";
> >
> >
> >As you may have guessed the table, bandbook is
> still
> >empty because the script always dies. Can anyone
> point
> >me in a better direction. Due to my unfamiliarity
> with
> >either language, I am definately not ruling out a
> >syntax error.
> >Thank You,
> >Paco
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Find a job, post your resume.
> >http://careers.yahoo.com
> >
>
>---------------------------------------------------------------------
> >Before posting, please check:
> > http://www.mysql.com/manual.php (the manual)
> > http://lists.mysql.com/ (the list
> archive)
> >
> >To request this thread, e-mail
> <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail
>
><[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
>
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php