Hey all,
I'm looking to create a nice way to separate view and controller in php.
What I'd like to happen is people would go to: localhost/index.php?view=signup and they would see the whole page with a signup box.. and NOT a login box.
I'm wondering if anyone has made this before.. I'm specifically looking for a elegant way of letting Javascript handle the hides and shows after php initially loads the page. So maybe something like this:
<div class="login" style="display:<?php echo $login; ?>;">
The trick is that I want the default (localhost/index.php) to display everything. So if ?view=.. is not defined then show it all.. I really don't want to clutter my view with a ton of if statements with isset()..
Let me know your solutions to this problem!
Thanks, Matt Mueller