This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('functions.php'); | |
$pdo = connectToDb(); | |
$keyword = $_POST["keyword"]; | |
if (isset($keyword)) { | |
// echo 'キーワード入力OK'; | |
// 実際にはPOSTデータを直接SQLに入れるこういうやり方はしない(脆弱性の問題。詳しくは課題のコメント参照ください) | |
$sql = "SELECT * FROM gs_bm_table WHERE name LIKE '%" . $keyword . "%'"; | |
$stmt = $pdo->prepare($sql); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vagrant 05:49:31 ~/work/example ]$ cat example.txt | |
test.example.net | |
tfst.example.net | |
tzst.example.net | |
tzzst.example.net | |
www.example.com | |
www.example.org | |
netapp.example.com | |
mail1.example.com | |
mail3.example.com |