Sunday, July 08, 2018
Seoul Bus Information - TOPIS (html, php)
-- html
<!DOCTYPE html>
<html>
<head>
<title>bus find</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="font-size:12;font-family:verdana">
<b>Search "station - topis.db"</b><br>
<form action="search_stname.php" method="post">
정류소ID<input type="text" name="stid"><input type="submit">
</form>
</body>
</html>
-- php
<?php
$stid = $_POST["stid"];
$stname = $_POST["stname"];
$line = $_POST["line"];
//$stname_es = sqlite_escape_string($stname);
// -- 다국어 -- 정류소아이디(stid) - station table
if ( !empty($stid) ) {
//$dbhandle = sqlite_open('topis.db', 667, $error);
//$dbhandle = new SQLite3('topis.db', 667, $error);
$myPDO = new PDO('sqlite:topis.db');
// if (!$dbhandle) die ($error);
// $stm0 = "select sn, stid, stname, xypos from station where stid = '01003'";
$stm0 = "select sn, stid, stnmkr, stnmen, stnmcn, stnmjp, note from mlineinfo where stid like '%".$stid."%';";
$result = $myPDO->query($stm0);
echo "<br><hr>정류소ID(stid)검색: ".$stm0."<br>";
//$ok = sqlite_exec($dbhandle, $stm, $error);
//if (!$ok) die("Error: $error");
//echo "Form submitted successfully";
echo "<table><tr><td>연번</td><td>정류소ID</td><td>정류소명</td><td>en</td><td>cn</td><td>jp</td></tr>";
foreach($result as $row) {
echo "<td>" . $row['sn'] . "</td>";
echo "<td>" . $row['stid'] . "</td>";
echo "<td>" . $row['stnmkr'] . "</td>";
echo "<td>" . $row['stnmen'] . "</td>";
echo "<td>" . $row['stnmjp'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
?>
Subscribe to:
Post Comments (Atom)
-
* postgres - pgmodelear ** new version > download: https://github.com/pgmodeler/pgmodeler sudo apt-get install qt-sdk sudo apt-get ins...
-
--> from: http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html Introduction to Literate Programming ...
-
유럽 연합 법규는 유럽 연합 방문자에게 블로그에 사용되는 쿠키에 대한 정보를 제공하도록 규제하고 있습니다. 또한 대부분의 경우 이러한 법규는 사용자의 동의를 얻도록 요구합니다. 이 규제를 준수할 수 있도록 Google은 귀하의 블로그에 Google이 ...
No comments:
Post a Comment