
INS
New User
Aug 28, 2002, 7:49 PM
Post #27 of 28
(7721 views)
|
This might be late, and I'm still new at Perl and DBI, but the only error I see is at the begining and the end of the following cut and paste code: $address = $field{'address'}; $email = $field{'email'}; $phone = $field{'phone'}; $user = $field{'user'}; $pass = $field{'pass'}; use DBI; $DSN = 'driver=Microsoft Access Driver (*.mdb); dbq=\\$c\\inetpub\\wwwroot\\DreamCpu.mdb'; my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') || die "Can't connect to database: $DBI::errstr"; print "Content-Type: text/html\n\n"; print"<html><body><h1>this is a test</h1>"; $sql = qq{INSERT INTO Dreamcpu (FirstName,LastName,Address,Email,Phone,Username,Password) VALUES ('$first','$last','$adress','$email','$phone','$user','$pass');}; Shouldn't $adress in the variable passed be $address, like declaired in the begining?
|