Skip to main content
Inspiring
Oct 2, 2017 8:06 PM UTC
Answered

.PHP Coding question

Created a site using .php in Dreamweaver, on all the pages the header is coded

<?php

include('header.php');

?>

it has navigation links

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a></li>

in the body of the page there are tables which have links to videos like this************************************************************

<div class="home_item_small div_common"><img width="275" height="150" border="0" class="home_item_img" title="" alt="" src="images/BaihraineStill.png"><br>

        <!--<i>Saturday Night Live</i><br />--><b>BALMAIN</b><br />

        Directed by Pascal Dangin</div>

        </a>

        </div>

I need to have the link with the *************************** changed so when clicking I can link to

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a>

I'm not a php person. Anyone?

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Nancy OShea
    Nancy OSheaCorrect answer
    Community Expert
    Oct 2, 2017 9:00 PM UTC

    Links inside the header.php file need to be relative to the parent page in which the PHP include statement occurs.   If your video pages are in a sub or sub-sub folder off the root, then you will need to use absolute URLS in your header.php file.

    <ul>

    <li> <a href=" http or https:// yoursite.com /index.php " title="Home">Home</a></li>

    <li><a href="http or https:// yoursite.com / bio.php" title="Bio">Bio</a></li>

    </ul>

    Nancy O'Shea— Product User & Community Expert

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    Oct 2, 2017 9:00 PM UTC

    Links inside the header.php file need to be relative to the parent page in which the PHP include statement occurs.   If your video pages are in a sub or sub-sub folder off the root, then you will need to use absolute URLS in your header.php file.

    <ul>

    <li> <a href=" http or https:// yoursite.com /index.php " title="Home">Home</a></li>

    <li><a href="http or https:// yoursite.com / bio.php" title="Bio">Bio</a></li>

    </ul>

    Translate
    Nancy O'Shea— Product User & Community Expert