Jump to content

PHP Navigation file


CLTaylor

Recommended Posts

Hi - I'm a newbie and need some basic PHP help.

 

I have created a navigation.php file with the HTML links

 

I use this code within the HTML source code to link to it

 

<?php include("navigation.php"); ?>

 

 

but it doesn't seem to be working

 

Can anyone see what is wrong?

Link to comment
Share on other sites

Thanks for helping. I wasn't sure how much code to put here, so I'm thinking it's easier to look here:

 

http://www.everythingmenopause.com/7dwarves.htm

 

This is the test page I've been using and if you FIND the first php reference, it's right there.

 

Here's the navigation file:

 

http://www.everythingmenopause.com/navigation.php

 

Thanks for helping

Link to comment
Share on other sites

Well, I took your URL and put in index.php and it seems to be including the file correctly. The link about the 7dwarves.htm has the <?php include... ?> code in it, but because it's an .htm page it won't actually process the php code. Rename it to 7dwarves.php and it will work. PHP code is only parsed on pages with the .php extension, unless you change some settings somewhere.

Link to comment
Share on other sites

Thanks for this answer, I will try it.

 

But it does bring up the question, "if I rename all of my .htm files, will I lose all my backlinks etc. coming into this site?"

 

That is a concern because this site has been up for 3 years, so does anyone know how to change "some settings" and what that means?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.