ckrudelux Posted June 23, 2009 Share Posted June 23, 2009 How do I do this? if(!isset($_GET)){header('Location index.php?m=1')} That i want it to do is too check if I got any GET's set and if not redirect. Link to comment Share on other sites More sharing options...
duncan_cowan Posted June 23, 2009 Share Posted June 23, 2009 I may be wrong but i believe that $_GET is always set and values are defined to it.try: if (count($_GET)!=0) {header('Location index.php?m=1')} Hope this helps. Link to comment Share on other sites More sharing options...
ckrudelux Posted June 23, 2009 Author Share Posted June 23, 2009 I may be wrong but i believe that $_GET is always set and values are defined to it.try:if (count($_GET)!=0) {header('Location index.php?m=1')} Hope this helps. It did help thanks alot. If echo: $_GET output: array if echo: count($_GET) output: total of $_GET what is set. Link to comment Share on other sites More sharing options...
mobone Posted June 24, 2009 Share Posted June 24, 2009 Yea you could also just check if $_GET['m'] is set, or just $m if globals is turned on. It did help thanks alot. If echo: $_GET output: array if echo: count($_GET) output: total of $_GET what is set. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.