if (($address == "") AND ( $date == "")) {
echo "";
} else {
date_default_timezone_set('Etc/GMT+8');
$sent_dt = date('Y-m-d H:i:s');
$sql = "INSERT INTO info (address,date) VALUES (:phone,:date)";
$q = $CNT->prepare($sql);
$q->execute(
array(
':address' => "$address",
':date' => "$sent_dt"
)
);
}
I want to put this script inside else so that every time there is a new data inserted it will notify me.
echo'<script>
Push.create("Hello from the other side!", {
body: "You're invited",
icon: "img/k.jpg",
timeout: 4000,
onClick: function () {
window.focus();
this.close();
}
});
</script>';
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…