![]() |
Creating Page Within Page?
How do I create a page within a page for example: www.example.com/example.php?do=news
Or something like: www.example.com/example.php?action=news I really need this soon so any help appreciated. |
Use php $_GET['do'] and $_GET['action'] to get the query string.
Use an if condition...if ($_GET['do'] == 'something') { DO THIS } else { DO THIS } etc Of course, this would be done in php. |
Quote:
I tried this many times without anything at all working Quote:
|
$_REQUEST is a very different function than $_GET.
Not sure what exactly you want to do with the code, so I won't tell you want to evaluate inside or anything...but to do something based on the query string use the code PHP Code:
|
Quote:
PHP Code:
|
You leave the '?' out of the $_GET command.
I advise you ask someone to do this for you, as you don't know PHP. You cant use bb code in php, nor html (directly). Although a relatively simple task, would take awhile to explain from scratch, especially when unaware of your intentions. I would advise checking out some php tutorials. |
Don't put the question mark in the if statement ('newsmain1' only) Try your if statement with that correction.
|
Quote:
And that's about it so I'm pretty sure somebody has a code for that. |
PHP Code:
Or fetch a template instead. |
Quote:
PHP Code:
|
Depends what page it is running on and where.
|
Quote:
It's supposed to be another page like example of something that isn't two pages in one but still example: forum 1 with a thread as another page. I want there to be another page within a PHP file so I wont have to create a PHP file for every page I want. |
What you're doing isn't really a 'page in a page', it's changing the output of a page based on an if condition. A page in a page would typically be a frame.
In any case, try this tutorial https://vborg.vbsupport.ru/showthrea...lletin+powered combined with the 'if' condition I showed you above. |
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">Create your own vBulletin page</a>, then you can use the above conditionals.
|
Quote:
Now I added: PHP Code:
Could somebody give me a code instead of letting a non experienced person mess around? |
Quote:
|
Quote:
Sorry I'm just not good at this. Please just give me a code instead. |
Please post the entire file you are using.
|
Quote:
PHP Code:
|
PHP Code:
|
Quote:
I still want the: PHP Code:
|
PHP Code:
|
Quote:
Thank you. |
All times are GMT. The time now is 06:32 PM. |
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:
|