OZONE Asylum
Forums
Site reviews!
New site layout
This page's ID:
10441
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
If the problem with the form is the display you could take a look at how I've done it one [url=http://www.golden-ratio.net/index.php?contact]my page[/url]. There are no tables and it works in all modern browsers (as far as I know...). If you need help with the server-side bit of it, we might need some more information... For the other thing, there are many ways to extract the page name (and everything else you need) from the $PHP_SELF variable. The way I've done it on my page might be a bit cumbersome to understand, but you can take a look [url=http://www.golden-ratio.net/src/index.phps]at it if you want[/url]... But from the top of my an easier to understand code would be: [code] <?php $str = $PHP_SELF; $links = array ( "index" => "0", "fb" => "1", "promo" => "2", ... ); $pages = array("index.php", "fb.php", "promo.php"...); $currentPage = 0; if ( preg_match("/\/(\w+).php/", $str, $matches) ) { // the regexp should work, but it might need some minor adjustment. // What it should do is exract what is between the \ and .php // and place it in the $matches array $currentPage = $links[$matches[0]]; } [/code] That would put a number $currentPage representing the page. And then using a loop resembling the one I posted before you can loop through the array printing the links as you go along. It might also be nice to add a array holding the $titles so you can use a print statment like: [code] echo "<a href=\"".$pages[$i]."\" class=\"normal\">".$title[$i]."</a>"; [/code] All of this code should go into your 'menu'-file. The code should work, but since I don't have time to test it right now there might be some mistakes in it. But at least you should get the general idea... _________________________ "There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero" - [url=http://www.golden-ratio.net]the Golden Ratio[/url] - [This message has been edited by Veneficuz (edited 09-25-2003).] [This message has been edited by Veneficuz (edited 09-25-2003).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »