Help with a PHP menu

sibrow

New Member
Messages
3
Reaction score
0
Points
0
Hi, I am starting a website, and eventualy it will have many pages.

There will need to be a menu on each page, and I realy dont fancy updatind the same menu on every single page.

I found this: which is what I am trying to do. I have uploaded www.zine.pcriot.com/menu.php and also www.zine.pcriot.com/main.html if I open the php file directly it works, but for some reason the main.html is not linking to it corectly (or at all). I also tried the asp version www.zine.pcriot.com/menu.asp and neither one works.

This: http://www.webmaster-talk.com/html-...g-content-links-several-pages.html#post324589 forum post explains what I am trying to do. Please help. Perhaps I dont have sufficient server priveledges?
 
Last edited:

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
for the PHP to properly work. The file opening the PHP file must be a *.php file.... simple PHP....
 

Adam01

New Member
Messages
114
Reaction score
0
Points
0
You can use frames and use the same menu (menu.htm) on everypage.

Or if you want it in php, you can add links to a database by php or manualy.
And then retreive it by the php while-loop command.

The following code will show each link across the page, with even space with between each link.

PHP:
*Database connect*

$links = 0;
while($DBLinks = $mysql_fetch_array['database'])
{
$links +=1;
$Link[$Links] = $DBLinks['url'];
}

$linkcount = 0;
$tablewidth = 100/$links;
echo "<table width='100%'><tr>";
while($link >= $linkcount){

echo "<td align=center width='".$tablewidth."%'>".$Link['$linkcount']."</td>";
$linkcount +=1;
}
echo "</tr></table>"


I havnt tested it, but thats roughly how it works.
 

sibrow

New Member
Messages
3
Reaction score
0
Points
0
Thanks for your help, changed the file to php and it works fine now. (im not using frames because ive heard there no good for google indexing.

Thanks again, Simon :)
 

dwd2000

Member
Messages
163
Reaction score
0
Points
16
This is what I'm using, and yes, with frames. I have a different index page with all the keywords and stuff in the head...and in the body!!! There is a link to the main site from that page. I've noticed that the search results from many search engines are based on the content, rather than keywords.

This is a javascript menu.
http://www.dynamicdrive.com/dynamicindex1/highlightmenu2.htm
 
Top