$php_mysql$ Posted August 19, 2011 Share Posted August 19, 2011 im trying to add the categories name in the show category page by default and check only those names details show else redirect the link is like this to category page goes like below Category=Music in category page i tried if($_REQUEST['Category'] !== 'Music'){ header("location: index.php"); } but its not doing anything Quote Link to comment https://forums.phpfreaks.com/topic/245193-issue-with-_request/ Share on other sites More sharing options...
titan21 Posted August 19, 2011 Share Posted August 19, 2011 Can you change $_REQUEST to $_GET and see if that works? Quote Link to comment https://forums.phpfreaks.com/topic/245193-issue-with-_request/#findComment-1259379 Share on other sites More sharing options...
$php_mysql$ Posted August 19, 2011 Author Share Posted August 19, 2011 tried it but every wrong words gets printed where i print the category name like $catname = $_REQUEST['Category']; echo "{$catname}"; Quote Link to comment https://forums.phpfreaks.com/topic/245193-issue-with-_request/#findComment-1259386 Share on other sites More sharing options...
titan21 Posted August 19, 2011 Share Posted August 19, 2011 Just making sure - is the url you're using whatever.php?Category=Music? also - try this print_r($_REQUEST) and see what teh output is? Quote Link to comment https://forums.phpfreaks.com/topic/245193-issue-with-_request/#findComment-1259387 Share on other sites More sharing options...
$php_mysql$ Posted August 19, 2011 Author Share Posted August 19, 2011 ah thanks all my bad i was testing it on a wrong php file :-D it is working great. tanks for you help guys \m/ Quote Link to comment https://forums.phpfreaks.com/topic/245193-issue-with-_request/#findComment-1259390 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.