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