echo "[";
while($hero2 = mysqli_fetch_assoc($hero1)){
$time_now = strtotime($hero2['cron1']);
$time_need = strtotime($hero2['cron2']);
if ($time_need>=$time_now ){
$t_s= date("H:i ",75600-($time_need-$time_now));
}
else {
$t_s= date("H:i ",75600-($time_now-$time_need));
}
echo str_replace(":",".",$t_s).",";
}
echo "]";
echo $post1["COUNT(*)"]
SELECT COUNT(email) AS emails FROM clients WHERE email = 'bill@microsoft.com';
<form action="1.php" method="post" id="form">
<a href="#" class="btn btn-box" onclick="sendForm()">отправить</a>
function sendForm(){
event.preventDefault();
$.ajax({
url: 'form.php',
type: 'POST',
data: $('#form').serialize(),
success: function(response) {
$('#result').html(response);
}
});
}
<meta.*charset=["]?([0-9A-z-]+)["]?[\/]?>
<meta charset="utf-8"> // utf-8
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/> // windows-1251
preg_match('~^'.preg_quote($uriPattern, '&').'$~', $this->uri)
$(function(){
$.getScript("https://twitch-dj.ru/api/get_track/1/callback/get_track");
});
function get_track(json){
$("#track_title").text(json.title);
}
function checkStatus($link, $port){
if (fsockopen($link, $port, $errno, $errstr, 30)){
return array('color' => 'green', 'text' => 'ONLINE');
}
else {
return array('color' => 'red', 'text' => 'OFFLINE');
}
}
$res = checkStatus('192.168.0.222', '29000');
echo "<font color='{$res['color']}' size='5'>{$res['text']}</font>";
$str = file_get_contents('https://www.rbc.ru');
$html = htmlspecialchars($str);
echo $html;
function sendForm(){
$.ajax({
url: 'form.php',
type: 'POST',
data: {
fio: $('form input').val();
},
success: function(response) {
$('#result').html(response);
}
});
}
// form.php
$data = file('user.txt', FILE_IGNORE_NEW_LINES);
if (in_array($_POST['fio'], $data)){
echo 'Yes';
}
else {
echo 'No';
}
// user.txt
Лердорф Расмус
Эйх Брендан
Тим Бернерс-Ли
Хокон Виум Ли