Skip to content

Instantly share code, notes, and snippets.

@Genora51
Last active February 6, 2017 18:23
Show Gist options
  • Save Genora51/0552eb79f95c8167e1d4ff69667cb747 to your computer and use it in GitHub Desktop.
Save Genora51/0552eb79f95c8167e1d4ff69667cb747 to your computer and use it in GitHub Desktop.
<?php
$sname = "localhost";
$usname = "root";
$pword = "";
$db = "day_ok";
$conn = new mysqli($sname,$usname,$pword,$db);
$dat = date('j');
$mon = date('n');
$sql = "SELECT name from `dates` where date=".$dat." AND month=".$mon.";";
$res = $conn->query($sql);
$row = $res->fetch_assoc();
echo $row["name"];
$conn->close();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment