<?php
//Connection statement
require_once('Connections/conn.php');
//Aditional Functions
require_once('includes/functions.inc.php');
// build the form action
$editFormAction = $_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) ? "?" . $_SERVER['QUERY_STRING'] : "");
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form_mutiere_firma")) {
$updateSQL = sprintf("UPDATE t_ausbildungsfirma SET name=%s, strasse=%s, plz=%s, ort=%s, tel=%s WHERE id=%s",
GetSQLValueString($_POST['fld_name'], "text"),
GetSQLValueString($_POST['fld_strasse'], "text"),
GetSQLValueString($_POST['fld_plz'], "int"),
GetSQLValueString($_POST['fld_ort'], "text"),
GetSQLValueString($_POST['fld_tel'], "text"),
GetSQLValueString($_POST['fld_id'], "int"));
$Result1 = $conn->Execute($updateSQL) or die($conn->ErrorMsg());
$updateGoTo = "d_ausbfirma_bearb.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
KT_redir($updateGoTo);
}
// begin Recordset
$colname__mutiere_firma = '-1';
if (isset($_GET['id'])) {
$colname__mutiere_firma = $_GET['id'];
}
$query_mutiere_firma = sprintf("SELECT * FROM t_ausbildungsfirma WHERE id = %s", GetSQLValueString($colname__mutiere_firma, "int"));
$mutiere_firma = $conn->SelectLimit($query_mutiere_firma) or die($conn->ErrorMsg());
$totalRows_mutiere_firma = $mutiere_firma->RecordCount();
// end Recordset .......
</table></td>
</tr>
<tr>
<td height="618" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="form_font">
<!--DWLayoutTable-->
<tr>
<td width="85" height="618" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="876" valign="top"><form action="<?php echo $editFormAction; ?>" method="POST" name="form_mutiere_firma" id="form_mutiere_firma">
<table width="876" border="0">
<tr>
<td width="160">ID</td>
<td width="627"><input name="fld_id" type="text" id="fld_id" value="<?php echo $mutiere_firma->Fields('id'); ?>"></td>
<td width="34"> </td>
<td width="37"> </td>
</tr>
<tr>
<td>Name</td>
<td><input name="fld_name" type="text" id="fld_name" value="<?php echo $mutiere_firma->Fields('name'); ?>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Strasse</td>
<td><input name="fld_strasse" type="text" id="fld_strasse" value="<?php echo $mutiere_firma->Fields('strasse'); ?>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>PLZ</td>
<td><input name="fld_plz" type="text" id="fld_plz" value="<?php echo $mutiere_firma->Fields('plz'); ?>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Ort </td>
<td><input name="fld_ort" type="text" id="fld_ort" value="<?php echo $mutiere_firma->Fields('ort'); ?>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Tel:</td>
<td><input name="fld_tel" type="text" id="fld_tel" value="<?php echo $mutiere_firma->Fields('tel'); ?>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Datensatz mutieren"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p> </p>
<input type="hidden" name="MM_update" value="form_mutiere_firma">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="118"> </td>
</tr>
</table>
</body>
</html><?php
$mutiere_firma->Close();
?>