I'm relatively new to PHP coding and have been working on a new site for a music venue. The events page retrieves information from the database about time, date, cost etc etc etc...
With a bit of help from a friend with the intial coding, , i use the getdate function to show the current months dates:
Code: Select all
//default date info//
$month=$today[month];
$year=$today[year];
//User selected date info//
$mselect=$_GET['mselect'];
$yselect=$_GET['yselect'];
//operational mode procedure call for the case statements//
$op=$_GET['op'];
if(!$op){$op='thisday';}
//mode switches for default and user data calling//
switch ($op)
{
case "thisday":
$result = mysql_query("SELECT * FROM `guests` WHERE `month`='$month' AND `year`='$year' ORDER BY `day` ASC");
$row=mysql_num_rows($result);
break;I am unsure how to get data from the database in a way to say *get this next four dates* rather than *get this months dates*.
I hope i'm making sense!!!
Thanks for any help.
Dan