Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^6: Perl and Mysql Queries

by Milti (Beadle)
on Jun 11, 2024 at 15:08 UTC ( [id://11159904]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Perl and Mysql Queries
in thread Perl and Mysql Queries

New Error message Tue Jun 11 08:05:16 2024 error client 73.21.226.229 Undefined subroutine &main::param called at E:\\Pinnacle\\DiversityLink\\cgi-bin\\job_post_test.pl line 13.,

Why? Never had this before?

Replies are listed 'Best First'.
Re^7: Perl and Mysql Queries
by marto (Cardinal) on Jun 11, 2024 at 15:49 UTC
Re^7: Perl and Mysql Queries
by Danny (Hermit) on Jun 11, 2024 at 15:23 UTC
     Undefined subroutine &main::param called

    That means CGI::param wasn't imported into main::param. It looks for main::param but can't find it. Make sure you import CGI::param with 'use CGI qw/:standard/;' or however you want. You might also consider using the object oriented style like.

    use CGI: my $q = CGI->new; my $var = $q->param('param_key');
Re^7: Perl and Mysql Queries
by hippo (Archbishop) on Jun 11, 2024 at 15:35 UTC
Re^7: Perl and Mysql Queries
by Milti (Beadle) on Jun 11, 2024 at 15:56 UTC
    <error message Tue Jun 11 08:41:15 2024 error client 73.21.226.229 Undefined subroutine &main::param called at E:\\Pinnacle\\DiversityLink\\cgi-bin\\job_post_test.pl line 13.,

    <Per a previous answer it appears that the following 'connect' statement has an error

    my $dbh = DBI->connect('dbi:mysql:jobs_db','Poster','Posterpasswd');

    What could it be when GRANT ALL have been given to the user 'Poster' Identified by 'Posterpasswd' ?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-09-13 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.