SteveFrost Posted October 9, 2009 Share Posted October 9, 2009 Hey,I am using the following code but the page keeps on returning False even if I enter a query string to fill the $id variable. <?phprequire_once('index_functions.php');require_once('breadcrumbs.php');class vfrHome{ public function QueryString() { $id = $_GET['id']; if (isset($this->id)) RecentNews($this->id); else RecentNews("0"); echo "False"; } public function Breadcrumbs() { $breadcrumb = new breadcrumb; $breadcrumb->dirformat='ucwords'; $breadcrumb->showfile=FALSE; echo $breadcrumb->show_breadcrumb(); echo " > Recent News"; } }?> Thanks in advance,Steve Link to comment Share on other sites More sharing options...
justsomeguy Posted October 9, 2009 Share Posted October 9, 2009 The echo statement isn't in the else, if you have more than one line after an if or else you need brackets. if (isset($this->id)) RecentNews($this->id); else { RecentNews("0"); echo "False"; } Link to comment Share on other sites More sharing options...
SteveFrost Posted October 9, 2009 Author Share Posted October 9, 2009 That worked a treat, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.