tokick4 0 Newbie Poster

Hello to everyone I am new to the site and have a question. I have a page that has a form to input into MySQL using PHP. What I am trying to do is have two searches that pulls out the information from different tables within the database, and put that information into the form and then save the form into its own table. I can search the tables and use dynamic record set to post the information to the form but when I do the second search the first search disappears. But the second search is posted into the form. This is the sample page. www.1stsourcesolution.com/inspectit/permit_index.php. The code for the page is quite lengthy but here it is. Thanks for any input.

<?php require_once('../Connections/testdata.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form4")) {
  $insertSQL = sprintf("INSERT INTO inspection (idinspection, inspection_date, comments, employee_idemployee, pass_failed) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['idinspection'], "int"),
                       GetSQLValueString($_POST['inspection_date'], "date"),
                       GetSQLValueString($_POST['comments'], "text"),
                       GetSQLValueString($_POST['employee_idemployee'], "int"),
                       GetSQLValueString($_POST['pass_failed'], "text"));

  mysql_select_db($database_testdata, $testdata);
  $Result1 = mysql_query($insertSQL, $testdata) or die(mysql_error());

  $insertGoTo = "permit_index.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_tms_search = "-1";

mysql_select_db($database_testdata, $testdata);
$query_tms_search = sprintf("SELECT tms_id, TMS, ONAME, ADDR, MADD, CITY, `STATE`, ZIP, permit.permit_id FROM tax_map, permit WHERE ONAME LIKE %s or TMS LIKE %s or MADD like %s ORDER BY permit.permit_id", GetSQLValueString($colname_tms_search . "%", "text"),GetSQLValueString($colname_tms_search . "%", "text"),GetSQLValueString($colname_tms_search . "%", "text"));
$tms_search = mysql_query($query_tms_search, $testdata) or die(mysql_error());
$row_tms_search = mysql_fetch_assoc($tms_search);
$colname_tms_search = "-1";

$colname_tms_search = "-1";
if (isset($_POST['ownerProperSearch'])) {
  $colname_tms_search = $_POST['ownerProperSearch'];
}
mysql_select_db($database_testdata, $testdata);
$query_tms_search = sprintf("SELECT tms_id, TMS, ONAME, ADDR, MADD, CITY, `STATE`, ZIP, permit.permit_id FROM tax_map, permit WHERE ONAME LIKE %s or TMS LIKE %s or MADD like %s ORDER BY permit.permit_id", GetSQLValueString($colname_tms_search . "%", "text"),GetSQLValueString($colname_tms_search . "%", "text"),GetSQLValueString($colname_tms_search . "%", "text"));
$tms_search = mysql_query($query_tms_search, $testdata) or die(mysql_error());
$row_tms_search = mysql_fetch_assoc($tms_search);
$totalRows_tms_search = mysql_num_rows($tms_search);

$colname_rsOwnerProp = "-1";
if (isset($_POST['ownerProperSearch'])) {
  $colname_rsOwnerProp = $_POST['ownerProperSearch'];
}
mysql_select_db($database_testdata, $testdata);
$query_rsOwnerProp = sprintf("SELECT * FROM tax_map WHERE ONAME LIKE %s", GetSQLValueString("%" . $colname_rsOwnerProp . "%", "text"));
$rsOwnerProp = mysql_query($query_rsOwnerProp, $testdata) or die(mysql_error());
$row_rsOwnerProp = mysql_fetch_assoc($rsOwnerProp);
$totalRows_rsOwnerProp = mysql_num_rows($rsOwnerProp);

mysql_select_db($database_testdata, $testdata);
$query_rsZoning = "SELECT zoning_district.zoning_district, zoning_district.Zone_description, zoning_district.`idzoning district` FROM zoning_district";
$rsZoning = mysql_query($query_rsZoning, $testdata) or die(mysql_error());
$row_rsZoning = mysql_fetch_assoc($rsZoning);
$totalRows_rsZoning = mysql_num_rows($rsZoning);

mysql_select_db($database_testdata, $testdata);
$query_rsFlood = "SELECT flood_zone.flood_zone, flood_zone.`idflood zone` FROM flood_zone";
$rsFlood = mysql_query($query_rsFlood, $testdata) or die(mysql_error());
$row_rsFlood = mysql_fetch_assoc($rsFlood);
$totalRows_rsFlood = mysql_num_rows($rsFlood);

mysql_select_db($database_testdata, $testdata);
$query_rsInspection = "SELECT * FROM inspection";
$rsInspection = mysql_query($query_rsInspection, $testdata) or die(mysql_error());
$row_rsInspection = mysql_fetch_assoc($rsInspection);
$totalRows_rsInspection = mysql_num_rows($rsInspection);

$colname_rsPermit = "-1";
if (isset($_GET['permit_id'])) {
  $colname_rsPermit = $_GET['permit_id'];
}
mysql_select_db($database_testdata, $testdata);
$query_rsPermit = sprintf("SELECT * FROM permit WHERE permit_id = %s", GetSQLValueString($colname_rsPermit, "int"));
$rsPermit = mysql_query($query_rsPermit, $testdata) or die(mysql_error());
$row_rsPermit = mysql_fetch_assoc($rsPermit);
$totalRows_rsPermit = mysql_num_rows($rsPermit);

$colname_rscontractor = "-1";
if (isset($_POST['conSearch'])) {
  $colname_rscontractor = $_POST['conSearch'];
}
mysql_select_db($database_testdata, $testdata);
$query_rscontractor = sprintf("SELECT * FROM contractor WHERE Company_Name LIKE %s", GetSQLValueString($colname_rscontractor . "%", "text"));
$rscontractor = mysql_query($query_rscontractor, $testdata) or die(mysql_error());
$row_rscontractor = mysql_fetch_assoc($rscontractor);
$totalRows_rscontractor = mysql_num_rows($rscontractor);

mysql_select_db($database_testdata, $testdata);
$query_rsWorkClass = "SELECT * FROM work_classification";
$rsWorkClass = mysql_query($query_rsWorkClass, $testdata) or die(mysql_error());
$row_rsWorkClass = mysql_fetch_assoc($rsWorkClass);
$totalRows_rsWorkClass = mysql_num_rows($rsWorkClass);

mysql_select_db($database_testdata, $testdata);
$query_rsTypeConstruction = "SELECT * FROM type_of_construction";
$rsTypeConstruction = mysql_query($query_rsTypeConstruction, $testdata) or die(mysql_error());
$row_rsTypeConstruction = mysql_fetch_assoc($rsTypeConstruction);
$totalRows_rsTypeConstruction = mysql_num_rows($rsTypeConstruction);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Permit</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen"/>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div align="center" id="mainWrapper">
<?php include_once("template_header.php");?>
<div id="pageContent">CONTENT GO HERE
  <br />
  <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
      <li class="TabbedPanelsTab" tabindex="0">Search Permit</li>
      <li class="TabbedPanelsTab" tabindex="0">Inspection</li>
      <li class="TabbedPanelsTab" tabindex="0">Add Permit</li>
<li class="TabbedPanelsTab" tabindex="0">Add Inspection</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
      <div class="TabbedPanelsContent">Permit Search:<br />
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20%"><p>Search for Permit by:</p>
              <form id="form1" name="form1" method="get" action="<?php echo $_SERVER ['PHP_SELF'];?>">
        <p>Search TMS: <br />
        BY <br />
          TMS Number, Owners Name, Address
          <label for="TMS_search"></label>
          <input type="text" name="TMSSearch" id="TMSSearch" />
          <input type="submit" name="submitSearch" id="submitSearch" value="Submit" />
          <label for="TMSSearch"></label>
          <label for="addressSearch"></label>
        </p>
</form></td>
            <td width="80%" valign="top"><p>Search Result:</p>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="18%">&nbsp;</td>
                <td width="19%">&nbsp;</td>
                <td width="15%">&nbsp;</td>
                <td width="17%">&nbsp;</td>
                <td width="16%">&nbsp;</td>
                <td width="1%">&nbsp;</td>
                <td width="2%">&nbsp;</td>
                <td width="4%">&nbsp;</td>
                <td width="4%">&nbsp;</td>
                <td width="4%">&nbsp;</td>
              </tr>
              <tr>
                <td><a href="#">Edit</a> | <a href="#">Add</a> | <a href="#">Delete</a> |<a href="#">Select</a></td>
                <td><?php echo $row_tms_search['permit_id']; ?></td>
                <td><?php echo $row_tms_search['TMS']; ?></td>
                <td><?php echo $row_tms_search['ONAME']; ?></td>
                <td><?php echo $row_tms_search['MADD']; ?></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table>
      </div>
      <div class="TabbedPanelsContent">INSPECTION:</div>
      <div class="TabbedPanelsContent">
        <p>PERMIT:
</p>
        <form id="searchOwnProp" name="searchOwnProp" method="post" action="<?php echo $_SERVER ['PHP_SELF'];?>">
Search for Owner of Properity:
          <label for="ownerProperSearch"></label>
          <input type="text" name="ownerProperSearch" id="ownerProperSearch" />
          <input type="submit" name="button" id="button" value="Search" />
        </form>
        <form id="form3" name="form3" method="post" action="">
Search Contractors:
          <label for="conSearch"></label>
          <input type="text" name="conSearch" id="conSearch" />
          <input type="submit" name="Search" id="Search" value="Submit" />
        </form>
        <p>&nbsp; </p>
        <form action=""method="post" name="form2" id="form2" >
          <table width="100%" border="0" align="center">
            <tr>
              <td colspan="2"><p>Job Site<br />
                /Physical Address
  <label for="MADD"></label>
                <input name="MADD" type="text" id="MADD" value="<?php echo $row_rsOwnerProp['GRM_LegalD']; ?>" size="60" maxlength="60" />
              </p></td>
              <td align="right">Bldg Use </td>
              <td width="41"><label for="occupancy2"></label>
                <select name="occupancy" id="occupancy2" title="<?php echo $row_rsOwnerProp['USECD']; ?>">
                  <?php
do {  
?>
                  <option value="<?php echo $row_rsOwnerProp['TMS']?>"><?php echo $row_rsOwnerProp['USECD']?></option>
                  <?php
} while ($row_rsOwnerProp = mysql_fetch_assoc($rsOwnerProp));
  $rows = mysql_num_rows($rsOwnerProp);
  if($rows > 0) {
      mysql_data_seek($rsOwnerProp, 0);
	  $row_rsOwnerProp = mysql_fetch_assoc($rsOwnerProp);
  }
?>
                </select></td>
              <td colspan="2" align="right">Zone District
                <label for="zoning"></label></td>
              <td width="144"><select name="zoning" id="zoning">
                <?php
do {  
?>
                <option value="<?php echo $row_rsZoning['idzoning district']?>"><?php echo $row_rsZoning['zoning_district']?></option>
                <?php
} while ($row_rsZoning = mysql_fetch_assoc($rsZoning));
  $rows = mysql_num_rows($rsZoning);
  if($rows > 0) {
      mysql_data_seek($rsZoning, 0);
	  $row_rsZoning = mysql_fetch_assoc($rsZoning);
  }
?>
              </select></td>
              <td width="144">Flood Zone 
                <label for="flood_zone"></label>
                <select name="flood_zone" id="flood_zone">
                  <?php
do {  
?>
                  <option value="<?php echo $row_rsFlood['flood_zone']?>"><?php echo $row_rsFlood['flood_zone']?></option>
                  <?php
} while ($row_rsFlood = mysql_fetch_assoc($rsFlood));
  $rows = mysql_num_rows($rsFlood);
  if($rows > 0) {
      mysql_data_seek($rsFlood, 0);
	  $row_rsFlood = mysql_fetch_assoc($rsFlood);
  }
?>
                </select></td>
            </tr>
            <tr>
              <td width="300">Lot No.
                <input name="lotno" type="text" id="lotno" value="<?php echo $row_rsOwnerProp['LEGAL']; ?>" /></td>
              <td width="300">Block
                <label for="block"></label>
                <input type="text" name="block" id="block" /></td>
              <td width="144">Subdividion/Complex</td>
              <td colspan="2"><label for="textfield"></label>
                <input name="textfield" type="text" id="textfield" value="<?php echo $row_rsOwnerProp['SUBD']; ?>" /></td>
              <td width="60">&nbsp;</td>
              <td align="right">TMS#</td>
              <td><label for="TMS"></label>
                <input name="TMS" type="text" id="TMS" value="<?php echo $row_rsOwnerProp['TMS']; ?>" /></td>
            </tr>
            <tr>
              <td>Owner of Property
                <label for="ownProp"></label>
                <input name="ownProp" type="text" id="ownProp" value="<?php echo $row_rsOwnerProp['ONAME']; ?>" size="50" /></td>
              <td>Mailing Address
                <label for="textfield2"></label>
                <input name="textfield2" type="text" id="textfield2" value="<?php echo $row_rsOwnerProp['MADD']; ?>" size="50" /></td>
              <td>City
                <label for="textfield3"></label>
                <input name="textfield3" type="text" id="textfield3" value="<?php echo $row_rsOwnerProp['CITY']; ?>" /></td>
              <td width="41" align="center">State
                <label for="textfield4"></label>
                <input name="textfield4" type="text" id="textfield4" value="<?php echo $row_rsOwnerProp['STATE']; ?>" size="2" /></td>
              <td width="99" align="center">Zip
                <label for="textfield5"></label>
                <input name="textfield5" type="text" id="textfield5" value="<?php echo $row_rsOwnerProp['ZIP']; ?>" size="6" /></td>
              <td>Phone
                <input name="textfield17" type="text" id="textfield17" size="10" /></td>
              <td align="center" valign="bottom">Fax
                <input name="textfield18" type="text" id="textfield18" size="10" /></td>
              <td>Email
                <label for="textfield25"></label>
                <input type="text" name="textfield25" id="textfield25" /></td>
            </tr>
            <tr>
              <td>Lessee of Building
                <label for="lesee"></label>
                <input name="contractor" type="text" id="contractor" size="50" /></td>
              <td width="300">Mailing Address
                <label for="textfield6"></label>
                <input name="textfield6" type="text" id="textfield6" size="50" /></td>
              <td>City
                <label for="textfield7"></label>
                <input name="textfield7" type="text" id="textfield7" /></td>
              <td align="center" valign="middle">State
                <label for="textfield8"></label>
                <input name="textfield8" type="text" id="textfield8" size="2" /></td>
              <td align="center">Zip
                <label for="textfield9"></label>
                <input name="textfield9" type="text" id="textfield9" size="6" /></td>
              <td>Phone
                <label for="textfield14"></label>
                <input name="textfield14" type="text" id="textfield14" size="10" /></td>
              <td align="center" valign="bottom">Fax
                <input name="textfield19" type="text" id="textfield19" size="10" /></td>
              <td>Email
                <input name="textfield26" type="text" id="textfield26" /></td>
            </tr>
            <tr>
              <td>Contractor
                <label for="lesee"></label>
                <input name="lesee" type="text" id="lesee" value="<?php echo $row_rscontractor['Company_Name']; ?>" size="50" /></td>
              <td>Mailing Address
                <label for="lessee_addr"></label>
                <input name="lessee_addr" type="text" id="lessee_addr" value="<?php echo $row_rscontractor['address']; ?>" size="50" /></td>
              <td>City
                <label for="textfield10"></label>
                <input name="textfield10" type="text" id="textfield10" value="<?php echo $row_rscontractor['city']; ?>" /></td>
              <td align="center">State
                <label for="textfield12"></label>
                <input name="textfield12" type="text" id="textfield12" value="<?php echo $row_rscontractor['state']; ?>" size="2" /></td>
              <td align="center">Zip
                <label for="less_zip"></label>
                <input name="less_zip" type="text" id="less_zip" value="<?php echo $row_rscontractor['zip']; ?>" size="6" /></td>
              <td>Phone
                <input name="textfield15" type="text" id="textfield15" value="<?php echo $row_rscontractor['phone_no']; ?>" size="10" /></td>
              <td align="center" valign="bottom">Fax
                <input name="textfield20" type="text" id="textfield20" size="10" /></td>
              <td>Email
                <input name="textfield27" type="text" id="textfield27" value="<?php echo $row_rscontractor['email']; ?>" /></td>
            </tr>
            <tr>
              <td>Contact
                <label for="contact"></label>
                <input name="contact" type="text" id="contact" size="50" /></td>
              <td>&nbsp;</td>
              <td valign="bottom">State Lic
                <label for="st_lic_nu"></label>
                <input name="st_lic_nu" type="text" id="st_lic_nu" value="<?php echo $row_rscontractor['state_lic_no']; ?>" size="11" /></td>
              <td align="center">&nbsp;</td>
              <td align="center">City Lic
                <label for="cit_lic_no"></label>
                <input name="cit_lic_no" type="text" id="cit_lic_no" value="<?php echo $row_rscontractor['city_lic_no']; ?>" size="11" /></td>
              <td>&nbsp;</td>
              <td align="center" valign="bottom">&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Architect/Engineer
                <label for="archEngineer"></label>
                <input name="archEngineer" type="text" id="archEngineer" size="50" /></td>
              <td>Mailling Address
                <label for="arch_addr"></label>
                <input name="arch_addr" type="text" id="arch_addr" size="50" /></td>
              <td>City
                <label for="textfield11"></label>
                <input type="text" name="textfield11" id="textfield11" /></td>
              <td align="center">State
                <label for="textfield13"></label>
                <input name="textfield13" type="text" id="textfield13" size="2" /></td>
              <td align="center">Zip
                <label for="arch_zip"></label>
                <input name="arch_zip" type="text" id="arch_zip" size="6" /></td>
              <td>Phone
                <input name="textfield16" type="text" id="textfield16" size="10" /></td>
              <td align="center" valign="bottom">Fax
                <input name="textfield21" type="text" id="textfield21" size="10" /></td>
              <td>Email
                <input type="text" name="textfield28" id="textfield28" /></td>
            </tr>
            <tr>
              <td>Contact
                <input name="contact" type="text" id="contact" size="50" /></td>
              <td>Email
                <label for="contact_email"></label>
                <input name="contact_email" type="text" id="contact_email" size="50" /></td>
              <td valign="bottom">State Lic
                <label for="st_lic_no"></label>
                <input name="st_lic_no" type="text" id="st_lic_no" size="11" /></td>
              <td>&nbsp;</td>
              <td align="center">City Lic
                <label for="city_lic"></label>
                <input name="city_lic" type="text" id="city_lic" size="11" /></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Work Classification
                <label for="workClass"></label></td>
              <td><select name="workClass" id="workClass">
                <?php
do {  
?>
                <option value="<?php echo $row_rsWorkClass['idwork classification']?>"><?php echo $row_rsWorkClass['work_classification']?></option>
                <?php
} while ($row_rsWorkClass = mysql_fetch_assoc($rsWorkClass));
  $rows = mysql_num_rows($rsWorkClass);
  if($rows > 0) {
      mysql_data_seek($rsWorkClass, 0);
	  $row_rsWorkClass = mysql_fetch_assoc($rsWorkClass);
  }
?>
              </select></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Description of Work:</td>
              <td colspan="7"><label for="work"></label>
                <label for="work"></label>
                <textarea name="work" id="work" cols="100" rows="5"></textarea></td>
              </tr>
            <tr>
              <td>Total Valuation
                <label for="value"></label>
                <input name="value" type="text" id="value" size="19" /></td>
              <td>Plan Check Fee
                <label for="planRevFee"></label>
                <input name="planRevFee" type="text" id="planRevFee" size="19" /></td>
              <td colspan="2">Permit Fee
                <label for="permitFee"></label>
                <input name="permitFee" type="text" id="permitFee" size="19" /></td>
              <td colspan="2" align="right">Total Permit Fee</td>
              <td><label for="total_fee"></label>
                <input type="text" name="total_fee" id="total_fee" /></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Date Received
                <label for="dateRec"></label>
                <input name="dateRec" type="text" id="dateRec" /></td>
              <td>Date Issued
                <label for="dateIssu"></label>
                <input type="text" name="dateIssu" id="dateIssu" /></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Type Constructin
                <select name="type_construction" id="type_construction">
                </select></td>
              <td><label for="type_construction"></label></td>
              <td>Sprinkled</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>Contact Name
                <label for="textfield23"></label>
                <input name="textfield23" type="text" id="textfield23" size="50" /></td>
              <td valign="bottom">Phone
                <label for="textfield22"></label>
                <input name="textfield22" type="text" id="textfield22" size="10" /></td>
              <td valign="bottom">Fax
                <label for="textfield24"></label>
                <input name="textfield24" type="text" id="textfield24" size="10" /></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form>
        <br />
      </div>
<div class="TabbedPanelsContent">
  <p>Inspection Request:</p>
  <form id="form3" name="form3" method="post" action=""><form action="<?php echo $editFormAction; ?>" method="post" name="form4" id="form4">
  <table align="center">
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Idinspection:</td>
      <td><input type="text" name="idinspection" value="<?php echo $row_rsInspection['idinspection']; ?>" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Inspection_date:</td>
      <td><input type="text" name="inspection_date" value="<?php echo $row_rsInspection['inspection_date']; ?>" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Code violation_id_code_violation:</td>
      <td><input type="text" name="code_violation_id_code_violation" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Comments:</td>
      <td><input type="text" name="comments" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Employee_idemployee:</td>
      <td><input type="text" name="employee_idemployee" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Pass_failed:</td>
      <td valign="baseline"><table>
        <tr>
          <td><input type="radio" name="pass_failed" value="1" <?php if (!(strcmp($row_rsInspection['pass_failed'],1))) {echo "checked=\"checked\"";} ?> />
            Passed</td>
        </tr>
        <tr>
          <td><input type="radio" name="pass_failed" value="0" <?php if (!(strcmp($row_rsInspection['pass_failed'],0))) {echo "checked=\"checked\"";} ?> />
            Failed</td>
        </tr>
      </table></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">&nbsp;</td>
      <td><input type="submit" value="Insert record" /></td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="form4" />
</form>
  </form>
  <p>&nbsp;</p>
</div>
    </div>
  </div>
</div>
<?php include_once("template_footer.php");?>
</div>

<p>&nbsp;</p>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:2});
</script>
</body>
</html>
<?php
mysql_free_result($tms_search);

mysql_free_result($rsOwnerProp);

mysql_free_result($rsZoning);

mysql_free_result($rsFlood);

mysql_free_result($rsInspection);

mysql_free_result($rsPermit);

mysql_free_result($rscontractor);

mysql_free_result($rsWorkClass);

mysql_free_result($rsTypeConstruction);
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.