Hi,
I need some PHP Code help.
The website is: http://www.glenridgeseniorcenter.com
On the side of the page, there is a part called "Upcoming Events"
I have it pulling the rows from the database.
However, when I enter the information into the database, it puts that row first, and is displaying the information out of order.
I want the dates to be in order. I'm not sure how to do it. Here is the code I have right now:
<?
$username="";
$password="";
$database="";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$result=mysql_query("select * from event_2 where month=".
date("n"));
for($i=1;$i<=mysql_num_rows($result);$i++){
$row=mysql_fetch_array($result);
?>
<b><? echo $row['month'] ?>/<? echo $row['day'] ?></b> - <? echo $row['event'] ?><br>
<?
}
?>