1

So I already have a main page then dynamic pages. But I want to know how to generate a dynamic page within a the generated page. For example, www.whatever.com/something.php?q=something?p=something

I want to make the dynamic page contain other dynamic pages within so I can switch out content in that page.

Any ideas?

So this page is done by www.website.com/folder/main.php?c=page1, in this div I want to do other content

 <div class="col s9 grey right">
    <!-- Teal page content  -->
    <div class="card-panel z-depth-2">
     <div class="row center">
                <div class="col s12">
                    <?php  include 'content.php';?>

                </div><!---panel personal stats---->
            </div><!---profile container row--->
</div>
  </div>

Within that url I'm trying to get something like this www.website.com/folder/main.php?c=page1/content/content?q=othercontent

Marcus Lee
  • 107
  • 1
  • 7
  • What you call "dynamic pages within a page" is usually referred to as a "partial". Take a look at the MVC approach to architecture. You will see that for each "page" that is created a "view" is used. Such view can integrate other "partial views", each can be rendered based on a different type of runtime values. Which is exactly what you are looking for. – arkascha Feb 05 '16 at 23:58

1 Answers1

0
$_GET

Search in internet $_GET and Url parameters, i.e. GET URL parameter in PHP

<div class="col s9 grey right">
<!-- Teal page content  -->
<div class="card-panel z-depth-2">
 <div class="row center">
            <div class="col s12">
                <?php  include 'content.php';
                if ($_GET['c'] == 'page') {
                    echo 'Ala ma kotA';
                } else {
                    echo 'Ala nie ma kotA';
                }
                ?>

            </div><!---panel personal stats---->
        </div><!---profile container row--->

Community
  • 1
  • 1
LuckyLue
  • 158
  • 9