$mysqli->query("INSERT INTO `cansus` (`name` , `text`, `date`) VALUES ('$name' , '$text', NOW())");
Дату отправляю в базу как обычно через hidden вот таким образом
var container = document.getElementById("load_div");
var str = container.innerText;
var words = str.split(/\s/);
while (container.hasChildNodes()) {
container.removeChild(container.lastChild);
}
words.forEach(function (item,idx) {
var el = document.createElement('p');
el.setAttribute("class","chat");
el.innerText = item;
container.appendChild(el);
} )
if(isset($_POST['btn']) and !empty($_POST['mytext']))
{
$mytext = $_POST['mytext'];
file_put_contents('123.txt', PHP_EOL . $mytext, FILE_APPEND);
}
var width = document.documentElement.clientWidth;
if (width > 992) {
document.location.href = "http://google.com";
}
SELECT *, FROM_UNIXTIME(date, '%d.%m.%Y') AS unixtime FROM `orders` WHERE unixtime = '23.03.2017'
$vivod = mysql_query("SELECT *, FROM_UNIXTIME(date, '%d.%m.%Y') AS unixtime FROM `orders` WHERE unixtime = '23.03.2017'")
html,body{
height:1500px;
}
#div{
margin-top:200px;
padding:30px;
background:#ee0;
border-radius:4px;
}
.back{
position:fixed;
top:0; left:0;
margin-top: 0 !important;
width:100%;
background-color:#cc0 !important;
}
$(window).scroll(function() {
body = $(window).scrollTop();
if(body > 200){
$("#div").addClass('back');
}else{
$("#div").removeClass('back');
}
});