#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use DBI;
$dbname = "bsr_writers";
require "./cookie.lib";
require "./vars.lib";
&get_input;
$state = $in{'state'};
$full_state = $rev_state{$state};
if ($full_state eq "") { print "Status: 404 Not Found\nContent-Type: text/html\n\n
404 File not found!
"; exit }
print "Content-Type: text/html\n\n";
$full_state = lc($full_state);
$full_state = ucfirstall($full_state);
print qq~
Resume Writers in $full_state ($state)
~;
open(LATEST, "../info/header.txt");
@bnr_all = ;
close(LATEST);
print "@bnr_all\n";
print qq~
$full_state Resume Writers
List of resume writers from $full_state state.
~;
$query = "select * from writers where state like '$state';";
$dbh = DBI->connect("DBI:mysql:$dbname:localhost", "root", "", {RaiseError => 0, PrintError => 0} );
$sth = $dbh->prepare($query);
$sth->execute();
while(@array = $sth->fetchrow_array()){
print qq~
- $array[1]
Resume Writer: $array[2]
$array[3], $array[4], $array[5], $array[6]
Phone: $array[7]
~
}
$sth->finish();
$dbh->disconnect();
open(LATEST, "../info/footer.txt");
@bnr_all = ;
close(LATEST);
print "@bnr_all\n";
print qq~
~;
exit;;