#!/usr/bin/perl -w
use strict;
use MDBI;
use CGI ':standard';
MConnect 'table_name', 'user', 'pwd';
if (not defined param('id') || not defined param('pwd')) {
print header(),
start_html('Please login'),
p('Pass authentication to the script!'),
end_html();
}
else {
my $data = MSelect {},
'* FROM monthly_record WHERE userid=? AND userpwd=?',
param('id'), param('pwd');
if (not defined $data) {
print header(),
start_html('Invalid Login'),
p('Invalid User Login. Try again.'),
end_html();
}
else {
print header(),
start_html('Monthly Record'),
p('Your monthly record report:'),
p($data->[0]->{'report'}),
end_html();
}
}
That snippet of code probably made as much sense to you as your questions did to me ;)
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.
|