Skip to main content
Inspiring
October 2, 2017
Answered

.PHP Coding question

  • October 2, 2017
  • 1 reply
  • 292 views

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 has been closed for replies.
    Correct answer Nancy OShea

    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>

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    October 2, 2017

    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