![]() |
multiple variable includes
like for example in register there is $action, and it says close to the top if $action==(nothing) then action==$signup or something like that.
How would I have 2 variable includes, so action, and page, so if $page and $action== nothing, then by default $page=main will be used, and if action=dostuff, then $page will be ignored...etc If this is even possible at all, please help, if it isn't, please warn me ahead of time, before I hunt for tutorials. |
I think I get what you are asking, you want something along the lines of:
PHP Code:
|
Try using:
PHP Code:
|
Thanks for replying.
I want to keep $page and $action seperate, like in Velocd tip, on the 2nd if, it says if $action=dostuff, then $page = ''; I think it would be easier if I put it kind of like this, how would I do 2 dynamic variable includes. Lets pretend :) I have an Information Section, Media Section, Reviews Setion, and a Main Section so, each of them have there own variable $information $media $reviews $main I am aiming to do this... If $information, $media, $reviews have no value, then $main include news.html Ex: index.php <--When nothing is specified news.html will be loaded where $main is to be invluded but when its like.. index.php?information=info/bio.html or something similar, then bio.html will load where $inforation is in the php file, and so on. Sorry that I am bad at explaining. I want to do something around this line Code:
if($action == '' && $page == '') { |
Let me ask this first:
Why are you trying to include an HTML file? Just do whatever your doing in the HTML within a template, and then use dooutput in the index.php file to output the template, when called. PHP Code:
|
Well I might be using this later on not with vb :)
|
All times are GMT. The time now is 10:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|