Is this possible anymore? PHP Switch call on function -
hey guys time looking @ project i'm working on! old project had semi-working 2 years ago isn't doing me whole lot. i'm hoping can save me lot of time rewriting this!
anyway it's smaller project i'm looking ioncube , instead of paying per file used able use switch , call on several different functions within 1 file.
anyway here's basic mockup of i'm trying do. said isn't working. when point browser index.php?action=calendar
it's blank other classes.
<?php include 'theme/header.php'; ?> <?php if (login_check($mysqli) == true) : ?> yes logged in <?php $action = $_get['action']; echo $action; switch($action){ case "calendar": calendar(); break; default: index(); break; } function index() { echo "hello"; } function calendar() { include 'calendar.php'; $calendar = new calendar(); echo $calendar->show(); } <?php else : ?> not logged in <?php endif; ?> <?php include 'theme/footer.php'; ?>
Comments
Post a Comment