| Server IP : 134.236.49.22 / Your IP : 216.73.216.114 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/water/ |
Upload File : |
<?php
include("wcconfig.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>บันทึกผลการตรวจน้ำประจำวัน</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<style type="text/css">
textarea {
margin: 0;
padding: 0;
border: 0;
width: 100%;
height: 100%;
display:block;
resize:none;/*Add this if you dont want users to resize */
}
.style6 {font-size: 60px}
.style5 {font-size: 40px}
</style>
<body>
<?PHP
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("water_check");
$datenow = date("Y-m-d H:i:s");
if (isset($_POST["save"])){
//$_POST["d"]= $date;
$_POST["sediment"]=$sediment;
$_POST["oxygen"]=$oxygen;
$_POST["chlorine"]=$chlorine;
//$_POST["acid-base"]= $acid-base;
/*echo $_POST["d"].'<br>';
echo $_POST["sediment"].'<br>';
echo $_POST["oxygen"].'<br>';
echo $_POST["chlorine"].'<br>';
echo $_POST["acid-base"].'<br>';*/
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$objDB = mysql_select_db("water");
$strSQL = "INSERT INTO water_check";
$strSQL .="(sediment,oxygen,chlorine,acidity)";
$strSQL .="VALUES";
$strSQL .="('$sediment','$oxygen;'";
$strSQL .=",'$chlorine','$acidity')";
$objResult = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
if($objResult) {
echo '<h3><p align="center" class="style6">บันทึกข้อมูลเรียบร้อย <br>';
} else echo mysqli_error($strSQL);
}
?>
<font size="10" >
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['SCRIPT_NAME'];?>" >
<table width="1080" align="center" >
<tr>
<td colspan="3" bgcolor="#00FFCC" align="center" height="100"> <span class="style6">บันทึกผลการตรวจน้ำประจำวัน</span></td>
</tr>
</table>
<table width="1080" align="center" bgcolor="#FFDBC7">
<tr>
<td align="right" colspan="2"><span >ค่าตะกอน (SV<sub>30</sub>)</span></td>
<td align="left" height="100" ><span >
<input type="text" name="sediment" id="sediment" size="1" maxlength="5" class="style6" value=""></span></td>
<!-- <td><span class="style6"> (ค่าปกติ 200-300)</span></td>-->
<td></td>
</tr>
<tr>
<td align="right" colspan="2"><span >ค่าออกซิเจนในน้ำ (DO)</span></td>
<td height="100" align="left" ><span >
<input type="text" name="oxygen" id="oxygen" size="1" maxlength="5" class="style6" value=""></span></td>
<!-- <td><span class="style6"> (ค่าปกติ 1-3 mg/L )</span></td>-->
<td></td>
</tr>
<tr>
<td align="right" colspan="2"><span >ค่าปริมาณคลอรีนคงเหลือ</span></td>
<td align="left" height="100" ><span class="style6">
<input type="text" name="chlorine" id="chlorine" size="1" maxlength="5" class="style6" value="" ></span></td>
<!--<td><span class="style6"> (ค่าปกติ 0.5-1 mg/L )</span></td>-->
<td></td>
</tr>
<tr>
<td align="right" colspan="2"><span >ค่าความเป็นกรด - ด่าง (pH)</span></td>
<td width="258" height="100" align="left" ><span class="style6">
<input type="text" name="acidity" id="acidity" size="1" class="style6" maxlength="3" value="" align="right">
</span></td>
<!--<td><span class="style6"> (ค่าปกติ 5-9 )</span></td>-->
<td width="183" rowspan="5" align="right"><img src="img/00.png" width="181" height="280"></td>
</tr>
<tr>
<td width="393" height="100" ><img src="img/water.png"></td>
<td width="226"> <input name="save" type="submit" class="style5" value="บันทึกข้อมูล" id="save" >
<p hidden><input name="d" type="text" value="<?php echo $datenow;?>" ></p>
</td>
<td></td>
<br>
</tr>
</table>
</form>
</font>
</body>
</html>