#!/usr/bin/perl use DBI; use warnings; my $firstname = $in{name}; my $db = "project_database"; my $host = "localhost"; my $user = "phillip"; my $pw = "steampunk333"; my $source = "DBI:mysql:database = project_database: host = localhost"; my $contactid; my $dbh; print "Content-type:text/html\n\n"; $dbh = DBI_>connect($source,$user,$pw) or die "Can't connect to database: $DBI::errstr\n"; my $qfirstname = dbh_>quote($firstname); if ($firstname eq "Alan") {$contactid = "Alan W.";} elsif ($firstname eq "Jake") {$contactid = "Jake M.";} elsif ($firstname eq "Jessica") {$contactid = "Jessica S.";} elsif ($firstname eq "Jim") {$contactid = "Jim S.";} else {$contactid = "0"; print "
Error: No Matches were found for your search. Did you include capital letters?
This is the information returned from your query:
Employee ID: $id
Last Name: $lastname
Date First Employed: $date_first_employed
Annual Salary: $annual_salary
Contact ID: $contactid
Email Address: $email_address
Home Phone Number: $home_phone_number
Emergency Phone Number: $emergency_phone_number