Skip to content

Instantly share code, notes, and snippets.

Created November 1, 2011 04:14
Show Gist options
  • Select an option

  • Save anonymous/1329911 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/1329911 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Warn voyage :: ระบบแจ้งเตือนสำหรับผู้ใช้มือถือระบบปฏิบัติการ Android</title>
<meta http-equiv="Content-Type" content="text/html; charset= utf-8"></head>
<body>
<?php
$objConnect = mysql_connect("localhost","thanapor_bus","busproject") or die("Error Connect to Database");
$objDB = mysql_select_db("thanapor_bus");
mysql_query("SET NAMES UTF8");
$strSQL = "select * from placeinfo where flag = 1";
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
if(!$objResult)
{
echo "ไม่พบข้อมูลที่ต้องการแก้ไข";
}
else
{
$lat = $_GET["lat"];
$lng = $_GET["lng"];
?>
<div>แก้ไขข้อมูลสถานที่</div><hr>
<form method="post" action="showupdateplace.php">
<table border="0">
<tr>
<td width="143">ชื่อสถานที่</td>
<input type="hidden" name="txtPlaceid" value="<?=$objResult['placeid'];?>"/>
<td width="300"><input type="text" name="txtPlacename" value="<?=$objResult['placename'];?>"/></td>
</tr>
<tr>
<td width="143">รายละเอียด</td>
<td width="300"><input type="text" name="txtPlacename" value="<?=$objResult['placedetail'];?>"/></td>
</tr>
<tr>
<td>ละติจูต</td>
<td><input type="text" name="txtPlacelat" value="<?php echo $lat ?>" />
</td>
</tr>
<tr>
<td>ลองติจูต</td>
<td><input type="text" name="txtPlacelong" value="<?php echo $lng ?>" />
</td>
</tr>
<tr>
<td>ประเภทสถานที่</td>
<td>
<select name="txtCateid">
<option value="0">เลือกประเภท</option>
<?php
$strSQL1 = "SELECT * FROM categoryinfo where status = 0";
$objQuery1 = mysql_query($strSQL1);
while($objResuut = mysql_fetch_array($objQuery1))
{
?>
<option value="<?=$objResuut['categoryid'];?>"><?=$objResuut["categoryname"];?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="hidden" name="txtflag" value="1"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="แก้ไขข้อมูล">
</td>
</tr>
</table>
</form>
</body>
</html>
<?
}
///mysql_close($objConnect);
?>
<?php
$_content = "pagefragment/updateplace.php";
include("mainlayout/mainadmin.php");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment