use CGI qw|:standard|; #my $firstname = $in{name}; my $firstname = CGI::param('name'); #### use strict; #<- get into the habit of using this #... my ($lastname, $date_first_employed, $annual_salary, $id , $email_address, $home_phone_number, $emergency_phone_number); while (($lastname, $date_first_employed, $annual_salary, $id, $email_address, $home_phone_number, $emergency_phone_number) = $sth->fethrow_array()) #... #### "SELECT lastname, date_first_employed, annual_salary FROM employees WHERE firstname = $qfirstname, SELECT * FROM employee_contacts WHERE contact_id = $qcontactid")