Hi can anyone help me.
I need to display the 3 most recent events and then the other remaining events need to be displayed in a drop down
this is what I have so far but the dropdown displays the first of the archived events and then any remaining only appear next to the dropdown.
Please this is killing me
I need to display the 3 most recent events and then the other remaining events need to be displayed in a drop down
this is what I have so far but the dropdown displays the first of the archived events and then any remaining only appear next to the dropdown.
Please this is killing me
Code:
$count = 0;
$getevent = mysql_query("select id,name,start_date,content,Location_c,objective,status,end_date from campaigns,campaigns_cstm where start_date < NOW() and campaigns.id = campaigns_cstm.id_c and status = 'Complete' and EventType_c = 'Taad' order by start_date desc");
while ($gotevent = mysql_fetch_row($getevent))
{
$count++;
if ($count <= 3)
{
$date = $gotevent[7];
$date_year=substr($date,0,4);
$date_month=substr($date,5,2);
$date_day=substr($date,8,2);
$date=date("l jS F Y", mktime(0,0,0,$date_month,$date_day,$date_year));
#<a href='viewevents.php?eventid=$gotevent[0]'></a>
echo "<h2>$gotevent[1]</h2><p><strong>Date: </strong>$date</br><strong>Venue: </strong>$gotevent[4]</p>";
echo "<p>$gotevent[3]</p><p><a href='viewevents.php?eventid=$gotevent[0]'><img src='/templates/taad/images/view.gif' alt='view story' width='43' height='15' border='0'></a><br><br><img src='/templates/taad/images/97.jpg'><br></p>";
}
else
{
echo"<form name='form1' method='post' action='viewevents.php?eventid=$gotevent[0]'>";
echo"<select name='events'>";
echo"<option value='$gotevent[0]'>$gotevent[1]</option>";
}
}
echo"</select><br><input type='submit' value='Go'></form>";