<?php
  
   if(isset($_POST['status'])){

          $status=$_POST['status'];
          $session =& JFactory::getSession();
          $session->set('status', $status);
       
    }
     if($_POST['status'] == "potential")
     {
         global $mainframe;
         $mainframe->redirect('index.php?option=com_chronocontact&chronoformname=freetrial');
   
      }

    $user =& JFactory::getUser();
    $userid=$user->id;
    $session =& JFactory::getSession();
    $session->set('cf_user_id', $userid);

$MyData =& CFChronoConnectionData::getInstance($MyConnection->connectionrow->id);
  if (!count($MyData->getDataRows())) {
         echo "No records found";
     }
?>


<table style="text-align: left; width: 100%;" cellpadding="5" cellspacing="2" BORDER="1" CELLSPACING="2" RULES=ALL FRAME="BOX" BORDERCOLOR="#c8bbb5">
  <tbody>

    <tr bgcolor="#dbd4d1">
        <td style="text-align:left;">&nbsp;</td>
        <td style="text-align:left;"><b>PAP Number</b></td>
        <td style="text-align:left;"><b>Last Name</b></td>
        <td style="text-align:left;"><b>First Name</b></td>
        <td style="text-align:left;"><b>Home Phone</b></td>
        <td style="text-align:left;"><b>Program</b></td>
        <td style="text-align:left;"><b>Status</b></td>
        <td style="text-align:left;"><b>Expiry Date</b></td>
        <!--<td style="text-align:left;">&nbsp;</td>-->
        <td style="text-align:left;">&nbsp;</td>
    </tr>
  