Please help.
I am using the following code below in my db.cgi file for record count. I have the record count displaying on all my screens fine. But how can I have it display the record count on a regular HTML file, maybe on a different server?
Thanks for any help.
Eddie
http://ai4uk.netfirms.com/
sub num_records {
# Displays number of records
my $count = 0;
open (DB, "<$db_file_name") or &cgierr("error in num_records. unable to open dat abase:$db_file_name.\nReason: $!");
LINE: while (<DB> ) {
if (!(/^#/) && !(/^\s*$/)) {
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
++$count;
}
}
close DB;
print $count;
I am using the following code below in my db.cgi file for record count. I have the record count displaying on all my screens fine. But how can I have it display the record count on a regular HTML file, maybe on a different server?
Thanks for any help.
Eddie
http://ai4uk.netfirms.com/
sub num_records {
# Displays number of records
my $count = 0;
open (DB, "<$db_file_name") or &cgierr("error in num_records. unable to open dat abase:$db_file_name.\nReason: $!");
LINE: while (<DB> ) {
if (!(/^#/) && !(/^\s*$/)) {
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
++$count;
}
}
close DB;
print $count;