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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ajax Test1</title> | |
</head> | |
<body> | |
<button id="button">送信</button> | |
<div><br></div> | |
<div id="result">戻り値をここに表示します</div> |
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 | |
$id = filter_input(INPUT_GET, 'val'); | |
echo $id + 100; | |
?> |
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
<?xml version="1.0"> | |
<all_test> | |
<test> | |
<title>山田太郎</title> | |
<point>90</point> | |
<impression>とても良い</impression> | |
</test> | |
<test> | |
<title>佐藤陽子</title> | |
<point>75</point> |
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
<html> | |
<head><title>テスト結果</title></head> | |
<body> | |
<h1>山田太郎</h1> | |
<table border="1"> | |
<tr><td>得点</td><td>90</td></tr> | |
<tr><td>所感</td><td>とても良い</td></tr> | |
</table> | |
<hr> | |
<h1>佐藤陽子</h1> |
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 | |
$id = filter_input(INPUT_GET, 'id'); | |
$name = filter_input(INPUT_GET, 'name'); | |
echo $id; | |
echo "<br />"; | |
echo $name; | |
?> |
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 | |
$id = filter_input(INPUT_GET, 'id'); | |
echo $id; | |
?> |
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 | |
if (!isset($_GET['id'])) { | |
$id = null; | |
} elseif (!is_string($_GET['id'])) { | |
$id = false; | |
} else { | |
$id = $_GET['id']; | |
} | |
echo $id; | |
?> |
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 | |
$id = $_GET['id']; | |
echo $id; | |
?> |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head><title>php sample</title></head> | |
<body> | |
<h1>PHPテスト 日付の表示</h1> | |
<p> | |
今日は | |
<?php | |
echo date('Y年m月d日'); | |
?> |
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 | |
$dsn = 'mysql:dbname=idle;host=localhost'; | |
$user = 'idlemaster'; | |
$password = 'idlepass'; | |
print('MySQLへの接続テスト'.'<br />'); | |
try{ | |
$dbh = new PDO($dsn, $user, $password); | |
$sql = 'select * from idlename'; | |
foreach ($dbh->query($sql) as $row) { |
NewerOlder