Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 05-13-2004, 09:41 PM   #1 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
A stupid question

I would like to use php to generate a menu in table cells that will exclude the current page from the menu. I have heard that it is bad to have a page link to itself. Can this be done for a table that has 3 col and 3 rows? I want the menu to be at the top of the page. Would I need to have some tag with an id on each page so it knows which item to leave out?

Thanks in advance for all your assistance.
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 05-13-2004, 10:26 PM   #2 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Try this. Here is a quick and easy sample.

[code:1:95e42c5493]<style>
.menudown { background-color: #498046;
font-family: Courier New;
padding: 3px;
border: inset #498046 2px;
margin-top: 2px;
color: #FFFFFF;
text-decoration: none
}

.menuup { background-color: #8CAE8A;
font-family: Courier New;
border: outset #8CAE8A 2px;
padding: 3px;
margin-top: 2px;
color: #006600;
text-decoration: none
}
.menuup:hover { background-color: #6C8E6A;
font-family: Courier New;
border: solid #FFFFFF 2px;
padding: 3px;
margin-top: 2px;
color: #FFFFFF;
text-decoration: none
}
</style>


<?php

//You need to define each page. You could also do this dynamically as a variable but this works for this example.
$pagenumber = 1;

for($i=1; $i<=10; $i++)
{
//If we are on page number $pagenumber
if($i == $pagenumber)
{
//We don't need a link so just print page's name.
echo '<span class="menudown">Link ' . $i . '</span>';
}
//We are not on page $pagenumber
else
{
//Print a link to page $i
echo '<a class="menuup" href="' . $i . '.php">Link ' . $i . '</a>';
}
}

?>

<P>Here is the rest of the HTML.</P>[/code:1:95e42c5493]

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid Question = Stupid Answer farooqaaa Forum Lobby 39 03-02-2007 08:47 AM
looking for stupid answers to my stupid question Axon Marketing Forum 7 02-21-2006 03:48 PM
Maybe a stupid question... thebassman SEO Forum 13 03-19-2004 11:39 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 08:23 PM.
© Copyright 2008 V7 Inc