Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Calling a PERL script from an html form

by InfiniteSilence (Curate)
on Jun 01, 2014 at 14:49 UTC ( #1088173=note: print w/replies, xml ) Need Help??


in reply to Calling a PERL script from an html form

You didn't provide enough of your Perl source code to solve your problem. When I copied your code to my machine I instantly got errors regarding the %in hash so I replaced that with the ever-popular CGI module:

use CGI qw|:standard|; #my $firstname = $in{name}; + my $firstname = CGI::param('name');

Now to get it to compile cleanly you have other problems:

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->f +ethrow_array()) #...

You are using $date_first_employed multiple times in while statement (I changed it) and although you were using $id in your print statement on line 61 you had not defined or set it to anything. Strict would have complained about these things.

Wow, my SQL skills must be getting rusty when I see your query -- from where I'm sitting that isn't ever going to work:

"SELECT lastname, date_first_employed, annual_salary FROM employees WH +ERE firstname = $qfirstname, SELECT * FROM employee_contacts WHERE contact_id = $qcontactid")

These are two totally separate SQL statements comma separated. Is there database engine that allows that? If so please let me know.

Celebrate Intellectual Diversity

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1088173]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-01-16 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?