-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
30 lines (26 loc) · 987 Bytes
/
test.php
File metadata and controls
30 lines (26 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
//$dsn="mysql:dbname= database;host=127.0.0.1";
/* $url = "127.0.0.1";
$user = "user";
$pass = "password";
$db = "database";
$table = "data";*/
if(!isset($_POST["lat"])){$_POST["lat"]="";}
if(!isset($_POST["lon"])){$_POST["lon"]="";}
$lat = htmlspecialchars($_POST["lat"]);
$lon = htmlspecialchars($_POST["lon"]);
/*
// MySQLへ接続する
$link = mysql_connect($url,$user,$pass) or die("MySQLへの接続に失敗しました。");
// データベースを選択する
$sdb = mysql_select_db($db,$link) or die("データベースの選択に失敗しました。");
// クエリを送信する
$sql = "SELECT * FROM $table where text LIKE BINARY '".$moji."'";
$result = mysql_query($sql, $link) or die("クエリの送信に失敗しました。<br />SQL:".$sql);
//結果セットの行数を取得する(PHP 5.5.0 では非推奨です)
$rows = mysql_num_rows($result);
//一致行数を返す
*/
$rows = 100;
echo $rows;
?>