Passing variables
Posted: Wed Oct 08, 2003 10:45 pm
I have a seemingly simple piece of code that doens't seem to be working...
[configure.php][mod_edit:
[configure.php]
Code: Select all
<?
include 'news.php';
include 'calendar.php';
if ($link == "news") {
echo 'this is where the news form would go';
}
else if ($link == "calendar") {
echo 'this is where the calendar form would go';
}
?>Code: Select all
tag added][/size]
Basically what happens is I have one page where records for news (news.php) and calendar (calendar.php) events are displayed on the page, there is a link to add a new calendar event or a new news item. From that link i pass the variable "configure.php?link=news" (for a new news item). When I pass this variable I want a form to be displayed at the bottom of the page. The variable gets passed ok but the if statement doesn't seem to get executed, any ideas? thanks.