Jump to content

Problem with $_GET being undefind


pleek

Recommended Posts

ok so i have this function in my forum

 

function hiliteItem($item) {
$action = $_REQUEST['action'];
$active = ' class="active_menu"';
if (strtolower($item) == strtolower($action)) {
	return $active;
} elseif (strtolower($item) == "home" && $action == "") {
	return $active;
} 

 

what it does is highlight the correct tab (the one currently being used). But sense the homepage is just index.php there is no "action" for it go get. This makes it spit out errors galore saying that "action" is undefined. Can this be edited so that if the "action" == "" it doesn't make an error? again this only a cures when the url is "index.php"

Link to comment
https://forums.phpfreaks.com/topic/139274-problem-with-_get-being-undefind/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.