Error getting Data from Data Base.
" . 'Error: '. mysql_error(). '
');
}
$row = mysql_fetch_array($listem);
$ID = $row['ID'];
$name_1 = $row['name_1'];
$name_2 = $row['name_2'];
$Company = $row['Company'];
$address = $row['address'];
$city = $row['city'];
$state = $row['state'];
$Country = $row['Country'];
if($state == "US" OR $state == "USA"){
$Cntry = " ";
}else{
$Cntry = "
".$Country;
}
$ZipCode = $row['ZipCode'];
$phone = $row['phone'];
$email = $row['email'];
$Link = $row['Link'];
$lunk = explode("/", $Link);
$lunkcount = count($lunk);
$l = $lunkcount - 1;
if($lunkcount > 1){
$lank = $lunk[$l];
}else{
$lank = $lunk[0];
}
$linky = explode(".", $lank);
$lcount = count($linky);
if($lcount == 2){
$linkout = "www.".$linky[0].".".$linky[1];
}elseif($lcount == 3){
$linkout = "www.".$linky[1].".".$linky[2];
}
$trak = $row['track'];
$req_by = $row['req_by'];
$level = $row['level'];
$dtnum = $row['dtnum'];
$chunk_dtnum = chunk_split($dtnum, 2, ':');
$chunk_arr = explode(":", $chunk_dtnum);
$datus = $chunk_arr[2].'-'.$chunk_arr[3].'-'.$chunk_arr[0].$chunk_arr[1];
$getcontact = mysql_query("SELECT ID FROM con_main WHERE email='$email'");
if(!$getcontact){
$bad[] = "Could not get contact identification.";
}else{//got contact info
$row = mysql_fetch_array($getcontact);
if($row[0] != ""){
$CID = $row[0];
}else{//no info match
$CID = 0;
}//there is no Contact ID to work with so it is zero
}//got contact info
$getprods = mysql_query("SELECT name,TRI,rate FROM refprod ORDER BY name");
if(!$getprods){
$prodex = "Could not retrieve Referrer Product List.";
}else{
while($rowp = mysql_fetch_array($getprods)){
$prodnames[] = $rowp[0];
$prodtris[] = $rowp[1];
$prodrates[] = $rowp[2];
}//while getting referrer products
}//gotprods
?>
");
}else{
echo("