- CodeIgniter 4 framework setup with SQL Server database config - Models: Control, Test, Dept, Result, Daily/ Monthly entry models - Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints - Views: CRUD pages with modal dialogs, dashboard, reports - Database: Migrations for control test and daily/monthly result tables - Legacy v1 PHP application preserved in /v1 directory - Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
32 lines
889 B
PHP
32 lines
889 B
PHP
<?php
|
|
if(!isset($_POST['submit'])) {
|
|
?>
|
|
<form method='POST'>
|
|
Test Name<br/>
|
|
<input type='text' name='testname' /><br/>
|
|
Unit<br/>
|
|
<input type='text' name='unit' /><br/>
|
|
Method<br/>
|
|
<input type='text' name='method' /><br/>
|
|
CVA<br/>
|
|
<input type='text' name='cva' /><br/>
|
|
BA<br/>
|
|
<input type='text' name='ba' /><br/>
|
|
TEA<br/>
|
|
<input type='text' name='tea' /><br/>
|
|
<input type='submit' name='submit' value='add' />
|
|
</form>
|
|
<?php
|
|
} else {
|
|
$testname=stripslashes($_POST['testname']);
|
|
$method = $_POST['method'];
|
|
$unit = $_POST['unit'];
|
|
$cva = $_POST['cva'];
|
|
$ba = $_POST['ba'];
|
|
$tea = $_POST['tea'];
|
|
$sql="INSERT INTO DICT_TEST(name, method, unit, cva, ba, tea) values ('$testname', '$method', '$unit', '$cva', '$ba', '$tea')";
|
|
$stmt = sqlsrv_query( $conn1, $sql );
|
|
if( $stmt == false) { die( print_r( sqlsrv_errors(), true) ); }
|
|
echo "<meta http-equiv='refresh' content='0;url=?p=dict' />";
|
|
}
|
|
?>
|