#!/usr/bin/perl
use strict;
use warnings;
use DBI;
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
my $cgi = CGI->new;
my %FORM = $cgi->Vars;
print $cgi->header;
warningsToBrowser(1);
DBI->trace(15); # value can be between 0 and 15
my $dsn = 'DBI:mysql:bcpadb:instance28854.db.xeround.com:18847';
my $dbh = DBI->connect($dsn, 'maxwell175', 'qwertyuiop',
{ RaiseError => 1 })
|| die "Could not connect to the database " . $DBI::errstr;
my $LName = $FORM{'LName'};
my $FName = $FORM{'FName'};
my $query = "SELECT * FROM people2 WHERE LName LIKE '$LName' AND FName LIKE '$FName'";
my $query1 = $dbh->prepare($query);
$query1->execute || die "Error executing 'select' query: " . $query1->errstr;
#print "$query";
#try replaceing the while with this.
my $results = $query1->fetchrow_hashref();
#my $FName = $results->{FName}; --- Not needed because passed in args
#my $LName = $results->{LName}; --- Same as above line
my $AddrLine1 = $results->{AddrLine1};
my $AddrLine2 = $results->{AddrLine2};
my $City = $results->{City};
my $Zip = $results->{Zip};
my $WAddrLine1 = $results->{WAddrLine1};
my $WAddrLine2 = $results->{WAddrLine2};
my $WCity = $results->{WCity};
my $WZip = $results->{WZip};
my $HPhone = $results->{HPhone};
my $MPhone = $results->{MPhone};
my $WPhone = $results->{WPhone};
my $Email = $results->{Email};
my $Company = $results->{Company};
my $Job_Title = $results->{Job_Title};
#}
print <<HTMLPAGE;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv='X-UA-Compatible' content='IE=EmulateIE7' />
<title>BCPA page - MDTech</title>
<meta name="msvalidate.01" content="6698DB3266240D800A1DEFB2AEE5249D" />
<meta name="msvalidate.01" content="BA291C2BB06D4C099CF9138D94C4C24B" />
<meta name="google-site-verification" content="Mv8ukVrmYK4zMgdnRp4qYETNyRnPyRtaI-YEzYjDzV0" />
<meta name="msvalidate.01" content="BA291C2BB06D4C099CF9138D94C4C24B" />
<meta name="google-site-verification" content="Mv8ukVrmYK4zMgdnRp4qYETNyRnPyRtaI-YEzYjDzV0" />
<!--[if IE 7]>
<style>
p {
line-height:18px;
padding-bottom:0px;
}
h1 {
font-size:20px;
font-weight:bold;
color:#272e34;
padding-bottom:0px;
}
h2 {
font-size:14px;
font-weight:bold;
color:#272e34;
padding-bottom:0px;
}
</style>
<![endif]-->
<meta name="google-site-verification" content="Mv8ukVrmYK4zMgdnRp4qYETNyRnPyRtaI-YEzYjDzV0" />
<meta name="msvalidate.01" content="BA291C2BB06D4C099CF9138D94C4C24B" />
<meta name="google-translate-customization" content="4870ff0762da6435-906b3721014154a0-g256d826ced58f04d-9"></meta>
<link rel='stylesheet' type='text/css' href='http://cdn1.editmysite.com/editor/libraries/fancybox/fancybox.css?1348176505'></script>
<link rel='stylesheet' href='http://cdn1.editmysite.com/editor/images/common/common-v2.css?buildTime=1348176505' type='text/css' />
<link rel='stylesheet' type='text/css' href='files/main_style.css?1348197132' title='wsite-theme-css' />
<style type='text/css'>
#wsite-content div.paragraph, #wsite-content p, #wsite-content .product-block .product-title, #wsite-content .product-description, .blog-sidebar div.paragraph, .blog-sidebar p, .wsite-form-field label, .wsite-form-field label {}
#wsite-content h2, #wsite-content .product-long .product-title, #wsite-content .product-large .product-title, #wsite-content .product-small .product-title, .blog-sidebar h2 {}
#wsite-title{}
</style>
<script type='text/javascript'><!--
var STATIC_BASE = 'http://cdn1.editmysite.com/';
var STYLE_PREFIX = 'wsite';
//-->
</script>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src='http://cdn1.editmysite.com/editor/libraries/jquery_effects.js?1348176505'></script>
<script type='text/javascript' src='http://cdn1.editmysite.com/editor/libraries/fancybox/fancybox.min.js?1348176505'></script>
<script type='text/javascript' src='http://cdn1.editmysite.com/editor/images/common/utilities-jq.js?1348176505'></script>
<script type='text/javascript' src='http://cdn1.editmysite.com/editor/libraries/flyout_menus_jq.js?1348176505'></script>
<script type='text/javascript'><!--
var IS_ARCHIVE=1;
(function(jQuery){
function initFlyouts(){initPublishedFlyoutMenus([{"id":"732580610550224581","title":"Home","url":"index.html"},{"id":"791199019507589116","title":"Software","url":"software.html"},{"id":"185665631450527889","title":"Contact Us","url":"contact-us.html"},{"id":"655691623107481862","title":"Register","url":"register.html"},{"id":"120377591448869403","title":"Windows 8 HOW-TOs","url":"windows-8-how-tos.html"},{"id":"383720836856858449","title":"HTTPS Mirror INFO","url":"https-mirror-info.html"},{"id":"970940401954682759","title":"How to install ooVoo","url":"how-to-install-oovoo.html"},{"id":"925835062994562531","title":"Subscribe for MDTech.us Newsletter","url":"subscribe-for-mdtechus-newsletter.html"},{"id":"664166098389600041","title":"MDT Certificate Authority","url":"mdt-certificate-authority.html"},{"id":"939902576679924408","title":"Visitor Map","url":"visitor-map.html"},{"id":"517608385647474105","title":"Install Teamviewer","url":"install-teamviewer.html"}],'590082422623526219',"<li class='wsite-nav-more'><a href='#'>more...<\/a><\/li>",'',false)}
if (jQuery) {
if (jQuery.browser.msie) window.onload = initFlyouts;
else jQuery(initFlyouts)
}else{
if (Prototype.Browser.IE) window.onload = initFlyouts;
else document.observe('dom:loaded', initFlyouts);
}
})(window._W && _W.jQuery)
//-->
</script>
</head>
<body class='wsite-theme-light wsite-page-bcpa-page'>
<div id="wrapper">
<div id="header">
<div id="sitename"><span id="wsite-title">MDTech</span></div>
</div>
<div id="navigation">
<div id="navigation"><ul><li id='pg732580610550224581'><a href='index.html'>Home</a></li><li id='pg791199019507589116'><a href='software.html'>Software</a></li></ul></div>
</div>
<div id="content-wrapper">
<div id="contents-body">
<div id="contents"><div id='wsite-content' class='wsite-not-footer'>
<h1>Edit your information and click "Submit":</h1>
<form action="/BCPA/BCPA_form/PROC/done/" method="get">
First Name: Last Name:<br />
<input type=text name="FName" value="$FName" style="height: 23px; width: 133px" readonly="readonly" />
<input type=text name="LName" value="$LName" style="height: 23px; width: 133px" readonly="readonly" /><br />
Email:
<br />
<input type="text" name="Email" value="$Email" style="height: 23px; width: 239px" />
<br /><br />
<h4>Your Address:</h4>
Address Line 1:<br />
<input type="text" name="AddrLine1" value="$AddrLine1" style="height: 23px; width: 239px" />
<br />Address Line 2:<br />
<input type="text" name="AddrLine2" value="$AddrLine2" style="height: 23px; width: 239px" />
<br />City: Zip:<br />
<input type="text" name="City" value="$City" style="height: 23px; width: 125px" />
<input type="text" name="Zip" value="$Zip" style="height: 23px; width: 63px" /> (state not needed)
<br /><br /><br />
<h4>Work Info:</h4>
Company:<br />
<input type="text" name="Company" value="$Company" style="height: 23px; width: 125px" />
<br />
Job Title:<br />
<input type="text" name="Job_Title" value="$Job_Title" style="height: 23px; width: 156px" />
<br /><br />
<font size="2"><b>Work Address:</b></font><br /><br />
Address Line 1:<br />
<input type="text" name="AddrLine1" value="$WAddrLine1" style="height: 23px; width: 239px" />
<br />Address Line 2:<br />
<input type="text" name="AddrLine2" value="$WAddrLine2" style="height: 23px; width: 239px" />
<br />City: Zip:<br />
<input type="text" name="City" value="$WCity" style="height: 23px; width: 125px" />
<input type="text" name="Zip" value="$WZip" style="height: 23px; width: 63px" /> (state not needed)
<br /><br />
<h4>Phone numbers:</h4>
Home Phone:<br /><input type="text" name="HPhone" value="$HPhone" style="height: 23px; width: 125px" /><br />
Mobile Phone:<br /><input type="text" name="MPhone" value="$MPhone" style="height: 23px; width: 125px" /><br />
Work Phone:<br /><input type="text" name="WPhone" value="$WPhone" style="height: 23px; width: 125px" /><br />
<br /><br />
<input type="button" action="submit" value="Submit" />
</form>
</div>
</div>
<div id="contents-bottom"></div>
</div>
</div>
<meta name="google-site-verification" content="Mv8ukVrmYK4zMgdnRp4qYETNyRnPyRtaI-YEzYjDzV0" />
<meta name="msvalidate.01" content="BA291C2BB06D4C099CF9138D94C4C24B" />
</body>
</html>
HTMLPAGE
exit;