- 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
26 lines
743 B
PHP
26 lines
743 B
PHP
<?php
|
|
if(!isset($_POST['submit'])) {
|
|
?>
|
|
<form method='POST'>
|
|
control name<br/>
|
|
<input type='text' name='cname' /><br/>
|
|
lot<br/>
|
|
<input type='text' name='lot' /><br/>
|
|
producer<br/>
|
|
<input type='text' name='producer' /><br/>
|
|
expdate<br/>
|
|
<input type='date' name='expdate' /><br/>
|
|
<input type='submit' name='submit' value='add' />
|
|
</form>
|
|
<?php
|
|
} else {
|
|
$cname=stripslashes($_POST['cname']);
|
|
$lot=$_POST['lot'];
|
|
$expdate=$_POST['expdate'];
|
|
$producer=$_POST['producer'];
|
|
$sql="INSERT INTO DICT_CONTROL(name,lot,producer,expdate) values ('$cname','$lot','$producer','$expdate')";
|
|
$stmt = sqlsrv_query( $conn1, $sql );
|
|
if( $stmt == false) { die( print_r( sqlsrv_errors(), true) ); }
|
|
echo "<meta http-equiv='refresh' content='0;url=?p=dict' />";
|
|
}
|
|
?>
|