Gayner Posted December 6, 2009 Share Posted December 6, 2009 and it has exit's for each $_GET's and everything so how can I add a footer at bottom? i try include, but if i go to like index.php?&Get=1 then the footer wont show cause im using exit in my function cause it's all in each function all in my index.php? How do i add a variable that ignores exit's so i show it all on buttom ?? thx Quote Link to comment https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/ Share on other sites More sharing options...
Alex Posted December 6, 2009 Share Posted December 6, 2009 You start by rethinking your logic. Having to use exit, die or any functions alike usually tells you that you have a problem with your coding logic. First off, I wouldn't suggest trying to keep your entire website within 1 page, this is just going to clutter thing without benefits. If you must, why don't you just use a switch? switch($_GET['something']) { case 'this': break; case 'that': break; default: // Invalid page ID or whatever.. break; } // Footer Quote Link to comment https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/#findComment-972537 Share on other sites More sharing options...
oni-kun Posted December 6, 2009 Share Posted December 6, 2009 and it has exit's for each $_GET's and everything so how can I add a footer at bottom? i try include, but if i go to like index.php?&Get=1 then the footer wont show cause im using exit in my function cause it's all in each function all in my index.php? How do i add a variable that ignores exit's so i show it all on buttom ?? thanks Yeah. Why do you have exits anyway? You just need to find a workaround with your logic and maybe use IF's to stop output rather than using exit() to destroy the output. Then you can work from there and add an include() for a footer. Quote Link to comment https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/#findComment-972539 Share on other sites More sharing options...
Gayner Posted December 7, 2009 Author Share Posted December 7, 2009 really easy fix <div class="contentstyles">content</div> <div id="footer">footer</div> #footer { width: 100%; position: absolute; bottom: 0px; left: 0px; background-color: #whatever } llollol Quote Link to comment https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/#findComment-972557 Share on other sites More sharing options...
emopoops Posted December 7, 2009 Share Posted December 7, 2009 oh yea feraure Quote Link to comment https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/#findComment-972570 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.