#!C:/Perl/bin/perl -w ##post_jobs.pl use CGI qw(:standard); use DBI; print "Content-type: text/html\n\n"; ###use POSIX qw(strftime); ####$shortdate = strftime "%B %d, %Y", localtime; $JobID=param('JobID'); $EmployerID=param('EmployerID'); $EmployerName=param('EmployerName'); $Title=param('Title'); $Logo=param('Logo'); $City=param('City'); $StateProvince=param('StateProvince'); $Description=param('Description'); $Function=param('Function'); $Sector=param('Sector'); $Country=param('Country'); $Posted=param('Posted'); if ($JobID eq ""||$EmployerID eq ""||$EmployerName eq ""||$Title eq ""||$Logo eq ""||$City eq ""||$StateProvince eq ""||$Description eq ""|| $Function eq ""||$Sector eq ""||$Country eq ""||$Posted eq ""||$Logo eq "") { print "The FORM is INCOMPLETE"; } else { my$dbh = DBI->connect('dbi:mysql:jobs_db', "Poster','Poster Password'); my$sth =$dbh->prepare("INSERT INTO jobs (JobID,EmployerID,EmployerName,Title,City,StateProvince,Description,Function,Sector,Country,Posted) Values(?,?,?,?,?,?,?,?,?,?,?)"); $sth ->execute($JobID,$EmployerID,$EmployerName,$Title,$City,$StateProvince,$Description,$Function,$Sector,$Country,$Posted); $sth ->finish(); $dbh->disconnect (); } #!/usr/local/bin/perl print "Your Ad Was Posted.\n"; exit;