Quote:
Originally Posted by Pseudomizer
This is very easy to answer. If you look at my original post you will see that i did put the echo with the link IN THE if and while loop. You placed it outside. Just have a look at my original code.
Cheers,
|
I've been trying to get this to work now, as posted in #18, but i'm getting an error message:
Fatal error: Call to a member function on a non-object in /home/n4f/html/calendarexport.php on line 3
What am i doing wrong? Not very familiar with what to do... Shouldn't my databasename be somewhere? or... Any help appreciated.
PHP Code:
echo "<hr><b><a href=\"http://www.mysite.com/forum/calendar.php?\">Latest Events</a> . . .</b><b><p>";
$events = $DB_site->query("select * from event order by dateline DESC limit 5");
if ($DB_site->num_rows($events))
{
while ($ev = $DB_site->fetch_array($events))
{
$new_date = vbdate('m.d.Y', $ev['dateline'], false, false);
$link_date = vbdate('Y-m-d', $ev['dateline'], false, false);
$news .= "<b>".$new_date."</b>"."<BR>";
$news .= "</b>".$ev['title']."<BR>";
}
}
echo "<A HREF=\"/forum/calendar.php?do=getinfo$ev[eventid]&day=$link_date&c=1\">$news</A>";