i have a table with 3 fields:
date | act | uni
date = date of the activity
act = Name of activity
uni = Dress code
what i would like is a table with the following info:
Next event: 10/2/03
activity: hand gliding
Dress: casual
the code i have so far is
<?php
$rs =@mysql_connect("localhost","login","password");
$rs =@mysql_select_db("database");
$sql ="select * from cal where date >= CURRENT_DATE limit0,1";
$rs =@mysql_query($sql);
if(mysql_num_rows($rs)==1)
{
$cal = mysql_fetch_assoc($rs);
echo "Next event: ".$cal["act"].",".$cal["date"].",".$cal["uni"]."!<br>";
}
?>