//post.php
<?php
if ( isset ( $_POST [ 'text' ] ) ) { $db = array ( 'host' => 'localhost' , 'user' => 'root' , 'pass' => '' , 'name' => 'microboard' ) ; $link = mysqli_connect ( $db [ 'host' ] , $db [ 'user' ] , $db [ 'pass' ] , $db [ 'name' ] ) ;
$text = $_POST [ 'text' ] ;
! empty ( $_POST [ 'username' ] ) ?
$username = $_POST [ 'username' ] : $username = "Аноним" ;
$queryResult = mysqli_query ( $link , "INSERT INTO `microboard`.`posts` (`name`, `message`) VALUES ('$username ', '$text ')" ) ; }
header ( 'Location: /index.php' ) ; ?>
Ly9wb3N0LnBocAoKPD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKCmlmIChpc3NldCgkX1BPU1RbJ3RleHQnXSkpIHsKCSRkYiA9IGFycmF5KCdob3N0JyA9PiAnbG9jYWxob3N0JywgJ3VzZXInID0+ICdyb290JywgJ3Bhc3MnID0+ICcnLCAnbmFtZScgPT4gJ21pY3JvYm9hcmQnKTsKCSRsaW5rID0gbXlzcWxpX2Nvbm5lY3QoJGRiWydob3N0J10sICRkYlsndXNlciddLCAkZGJbJ3Bhc3MnXSwgJGRiWyduYW1lJ10pOwoKCSR0ZXh0ID0gJF9QT1NUWyd0ZXh0J107CgoJIWVtcHR5KCRfUE9TVFsndXNlcm5hbWUnXSkgPyAkdXNlcm5hbWUgPSAkX1BPU1RbJ3VzZXJuYW1lJ10gOiAkdXNlcm5hbWUgPSAi0JDQvdC+0L3QuNC8IjsKCQoJJHF1ZXJ5UmVzdWx0ID0gbXlzcWxpX3F1ZXJ5KCRsaW5rLCAiSU5TRVJUIElOVE8gYG1pY3JvYm9hcmRgLmBwb3N0c2AgKGBuYW1lYCwgYG1lc3NhZ2VgKSBWQUxVRVMgKCckdXNlcm5hbWUnLCAnJHRleHQnKSIpOwp9CgpoZWFkZXIoJ0xvY2F0aW9uOiAvaW5kZXgucGhwJyk7Cj8+Cg==