<!doctype HTML>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script>
function play() {
document.getElementById('yamero').play();
}
</script>
<?php
$startcount = 0;
if (isset($_POST['button'])) {
$startcount = countInc();
}
function countInc() {
$count = ("counter.txt");
$clicks = file($count);
$clicks[0]++;
$counter = fopen("counter.txt", "w+") or die("Error opening counter.txt!");
fwrite($counter, "$clicks[0]");
return $clicks[0];
}
?>
<div id="box">
<a id="counter"><?php echo </a>
<form method="POST">
<input type="submit" id="button" name="button" value="やめろ!!" onclick="play();">
</form>
</div>
<audio id="yamero" src="yamero.mp3" preload="auto"></audio>
</body>
</html>