|
|
|
<?
// I wanted a simple way to find customers that had birthdays each day
// of the week so I could send them a card. Here it is, Hope it helps.
//==========================================================================
?>
<html>
<head>
<title></title>
</head>
<body bgcolor="white" link="blue" vlink="magenta" alink="red">
<table width="680" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<?
$db = mysql_connect("localhost", "root");
$Date = date("m/d");
mysql_select_db("customers",$db);
$result = mysql_query("SELECT * FROM Cinfo WHERE Bday = '$Date'");
echo "<table width='500' align='center' cellpadding='2' cellspacing='2' border=1>\n";
echo "<tr><td>First Name</td><td>Last
Name</td><td>Birthday</td><td>Year</td></tr>\n";
while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",
$myrow[1], $myrow[2], $myrow[3], $myrow[4]);
}
echo "</table>\n";
?>
</td>
</tr>
<tr>
<td>
<CENTER>
<FONT SIZE="1" COLOR="RED"><B>The date today is,</B></FONT>
<FONT SIZE="1" COLOR="NAVY"><? echo date("M. d, Y");?><FONT>
</CENTER>
</td>
</tr>
</table>
</body>
</html>
|
|
| Simple function to return the number of days in a time span between 2 given dates. Categories : PHP, Date Time, MySQL, Databases | | | Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL | | | PHP Calendar Web App Categories : PHP, Databases, MySQL, Date Time, Calendar | | | In Mysql, the 'datetime' data type is used to store date that looks like '2007-10-16 16:26:30'. we are going to design a function called mysqldate() that takes a mysql date and output format as input and outputs a well formated date. Categories : PHP, Date Time, Databases, MySQL | | | Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays. Categories : Calendar, Date Time, PHP, Databases, MySQL | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | formating MySQL Timestamp to get a propper Output.
related : Timestamp, ereg_replace, mysql, substr Categories : MySQL, PHP, Date Time, Databases | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | mysql date/time converters Categories : PHP, MySQL, Databases, Date Time | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | | | This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time | | | AJAX Data Grid System using php and mysql. A complete login system with the ability to display data in a grid using ajax. Add , update and delete the records without reloading the page. Categories : PHP, AJAX, Databases, MySQL, Java Script | |
|
|