Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

.PHP Coding question

Engaged ,
Oct 02, 2017 Oct 02, 2017

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?

251
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 02, 2017 Oct 02, 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>

Translate
Community Expert ,
Oct 02, 2017 Oct 02, 2017
LATEST

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 & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines