//index.php
<!DOCTYPE html>
<html>
<head>
<title>Microboard</title>
</head>
<body>
<?php
$db = array('host' => 'localhost', 'user' => 'root', 'pass' => '', 'name' => 'microboard'); $link = mysqli_connect($db['host'], $db['user'], $db['pass'], $db['name']);
//var_dump($queryResult);
//$data = mysqli_fetch_assoc($queryResult);
$headersNumber = $queryResult -> num_rows;
//$row = mysqli_fetch_row($queryResult);
for ($i=0; $i<$headersNumber; $i++) {
echo "<p><b>№$row[0] $row[2] $row[3]</b><br>$row[1]</p><hr>";
}
?>
<script type="text/javascript">
alert("test");
</script>
<form method="post" action="/post.php">
Name:
<input type="text" name="username">
<br>
Комментарий:<br>
<textarea type="text" name="text" rows="3" cols="64" required></textarea>
<br>
<input type="submit" value="Отправить пост">
</form>
</body>
</html>
Ly9pbmRleC5waHAKCgo8IURPQ1RZUEUgaHRtbD4KPGh0bWw+Cgo8aGVhZD4KCTx0aXRsZT5NaWNyb2JvYXJkPC90aXRsZT4KPC9oZWFkPgoKPGJvZHk+Cgo8P3BocAplcnJvcl9yZXBvcnRpbmcoLTEpOwoKJGRiID0gYXJyYXkoJ2hvc3QnID0+ICdsb2NhbGhvc3QnLCAndXNlcicgPT4gJ3Jvb3QnLCAncGFzcycgPT4gJycsICduYW1lJyA9PiAnbWljcm9ib2FyZCcpOwokbGluayA9IG15c3FsaV9jb25uZWN0KCRkYlsnaG9zdCddLCAkZGJbJ3VzZXInXSwgJGRiWydwYXNzJ10sICRkYlsnbmFtZSddKTsKCiRxdWVyeVJlc3VsdCA9IG15c3FsaV9xdWVyeSgkbGluaywgIlNFTEVDVCAqIEZST00gcG9zdHMiKTsKCi8vdmFyX2R1bXAoJHF1ZXJ5UmVzdWx0KTsKCi8vJGRhdGEgPSBteXNxbGlfZmV0Y2hfYXNzb2MoJHF1ZXJ5UmVzdWx0KTsKJGhlYWRlcnNOdW1iZXIgPSAkcXVlcnlSZXN1bHQgLT4gbnVtX3Jvd3M7Ci8vJHJvdyA9IG15c3FsaV9mZXRjaF9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