Re: Perl and Mysql display data problem
Darren Duncan <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <p06230903c0c39872c86c@[192.168.1.101]> |
At 3:15 PM -0700 6/24/06, FoRo wrote:
>Hello I have several problems. I'm trying to write a perl script that would
>check the username and password from Mysql database and allow users to
>login. I'm new to both systems and i have a lot of oruble with them. Here is
>the perl script that i'm trying to build.
Your problem is not specific to MySQL, but that you used some bad
general Perl syntax.
For example, the line that declares "my $uid" is commented out, so
you get that undeclared variable warning; you need to have an
uncommented "my $uid;".
Also, you should take this line:
my ($input_username = "bobob", $input_password = "password")
And change it to (note also the trailing semicolon):
my ($input_username, $input_password) = ("bobob", "password");
That explains the errors you are getting right now.
Assuming your Perl is version 5.6 or newer (or best, 5.8 or newer),
you can also put a "use warnings;" at the top of your script like the
"use strict;", which removes the need for any "-w" flag; easier to
use in my opinion.
-- Darren Duncan
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/[email protected]