peranha Posted February 17, 2008 Share Posted February 17, 2008 This is on the index.php page, and is supposed to redirect to the page depending on the action. I know it is setting the action as the echo writes out what is in the address bar. test.php?action=addcomm will echo addcomm which is the first case. <?php $action = $_GET['action']; echo $action; switch($action){ case 1: include('pages/addcomm.php'); break; case 2: include('pages/admin.php'); break; case 3: include('pages/adminuser.php'); break; case 4: include('pages/addcomm1.php'); break; case 5: include('pages/adminuser1.php'); break; case 6: include('pages/adminuser2.php'); break; case 7: include('pages/adminuser3.php'); break; case 8: include('pages/banipadd.php'); break; case 9: include('pages/banipadd1.php'); break; case 10: include('pages/banuser.php'); break; case 11: include('pages/banuserproc.php'); break; case 12: include('pages/citysupport.php'); break; case 13: include('pages/countrysupport.php'); break; case 14: include('pages/dealersupport.php'); break; case 15: include('pages/dealersupporttable.php'); break; case 16: include('pages/dealertablesubmit.php'); break; case 17: include('pages/distinctip.php'); break; case 18: include('pages/distinctip1.php'); break; case 19: include('pages/login.php'); break; case 20: include('pages/logout.php'); break; case 21: include('pages/prologin.php'); break; case 22: include('pages/statesupport.php'); break; } ?> Any ideas will be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/91481-solved-cant-figure-this-out/ Share on other sites More sharing options...
tippy_102 Posted February 17, 2008 Share Posted February 17, 2008 In the example above, instead of "Case 1" it should say: case 'addcomm' Link to comment https://forums.phpfreaks.com/topic/91481-solved-cant-figure-this-out/#findComment-468611 Share on other sites More sharing options...
peranha Posted February 17, 2008 Author Share Posted February 17, 2008 Alright, Yes thanks, Just figured it out, Was looking at the manual, and just put in 1, 2, 3, and so on. Didnt read it fully. Link to comment https://forums.phpfreaks.com/topic/91481-solved-cant-figure-this-out/#findComment-468612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.