|
 |
|
สอบถาม การ Update ข้อมูลครับ ข้อมูลไม่เข้า ฐานข้อมูล |
|
 |
|
|
 |
 |
|
อ้างอิงชื่อตัวแปรผิดน่ะครับ
<html>
<head>
<title>DS-Queue</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/bootstrap-datepicker.css" rel="stylesheet">
</head>
<body>
<?php
include 'top.php';
?>
<div class="container">
<div class="row">
<div class="col-md-3">
<form name="frmSearch" method="get" action="<?php echo $_SERVER['SCRIPT_NAME'];?>">
<div class="container">
<div class="col-md-3">
<label for="textsearch" >ระบุเอกสาร:</label>
<input name="txtKeyword" type="text" id="txtKeyword" class="form-control" placeholder="ข้อความ คำค้นหา!" required value="<?php echo $_GET["txtKeyword"];?>">
<input type="submit" class="btn btn-sm btn-warning" value="ค้นหาเอกสาร"></th>
</div>
</form>
<?php
if($_GET["txtKeyword"] != "")
{
$objConnect = mysql_connect("localhost","root","6000") or die("Error Connect to Database");
$objDB = mysql_select_db("er001");
mysql_query("SET NAMES UTF8");
$strSQL = "SELECT * FROM doc_return WHERE (d_type LIKE '%".$_GET["txtKeyword"]."%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<form name="body" method="post" action="<?php echo $_SERVER['SCRIPT_NAME'];?>">
<input type='hidden' name='d_id' value="<?php echo $objResult["d_id"];?>">
<table width="80%" border="1" class="table table-bordered">
<tr>
<th width="91"> <div align="center">No.</div></th>
<th width="91"> <div align="center">เลขที่เอกสาร</div></th>
<th width="150"> <div align="center">ชื่อผู้ค้า </div></th>
<th width="98"> <div align="center">ผู้ทำรายการ </div></th>
<th width="98"> <div align="center">วันที่เข้ารับสินค้า </div></th>
</tr>
<?php
while($objResult = mysql_fetch_array($objQuery))
{
?>
<tr>
<td><div align="center"><?php echo $objResult["d_id"];?></div><input type="hidden" name="d_id" value="<?php echo $objResult["d_id"];?>"></td>
<td><div align="center"><?php echo $objResult["d_type"];?></div></td>
<td><?php echo $objResult["d_site"];?></td>
<td><?php echo $objResult["ds_user"];?></td>
<td align="right"><input type="text" name="tanggal_lahir" value="<?php echo $objResult["d_ds_date"];?> " class="input-group date form-control" date="" data-date-format="yyyy-mm-dd" required></td></tr>
<td> <input type="submit" class="btn btn-sm btn-warning" value="บันทึกข้อมุล"></th>
</tr>
</div>
</table>
<?php
}
?>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script>
$('.date').datepicker({
format: 'yyyy-mm-dd',
})
</script>
<?php
mysql_close($objConnect);
}
?>
</script>
<?php
$objConnect = mysql_connect("localhost","root","6000") or die("Error Connect to Database");
$objDB = mysql_select_db("er001");
mysql_query("SET NAMES UTF8");
$sqle = "UPDATE doc_return SET d_ds_date = '".$_POST['tanggal_lahir']."', d_ds_job = 'y' WHERE d_id = '".$_POST['d_id']."'";
$resulte=mysql_query($sqle) or die ("not");
mysql_close($objConnect);
?>
<br>
</form>
</body>
</html>
|
 |
 |
 |
 |
Date :
2017-02-21 23:31:31 |
By :
tomrambo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|