Jump to content

My Whole index.php is based on my site..


Gayner

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/184207-my-whole-indexphp-is-based-on-my-site/
Share on other sites

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.