Hi,
I need a navigation include that can deal with directories at different levels on a site. All I can seem to find are the basic includes for files all in the same directory. This doesn't work for me because as soon as you navigate to a page in a nested directory the relative links don't work.
Is the only option for me to use absolute links? This would cause difficulty as I would need different addresses to achieve the same result on the testing server and remote site.
I also need to be able to identify the current page to style the link. At the moment I am using the code below which is fine whilst everything is in the same directory but introduce nested directories and some links will be reachable with just the $base. But only as long as current page and destination page are in the same directory.
Code: $base=basename($_SERVER['PHP_SELF']);
$menu=preg_replace("|<li><a href="".$base."">(.*)</a></li>|U", "<li class="current">$1</li>", $menu);
echo $menu;
I would greatly appreciate your help
Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...On first.php I have one input field NAME, and on posting the form it moves to "second.php" showing the entered value of input field using $_POST,
Got A Free Server :(
So I was given a free server http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1990708735It is a Compaq Proliant 1500 :|And I cannot seem to get it to install any OS from the CD drive
whats wrong with my code please help!!!
this is the errorWarning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /var/www/IpSearch.php on line Code: [Select]<?php$srch = $_REQUEST["srch"];if
switch form actions? not working
i want on submit to go to different pages according to the CatIDCode: <?php $CatID=$_GET['CatID'];if (isset($CatID)) { }switch ($CatID){ case 1: echo '<form
How to write on database when a link is clicked?
Hi,
gather checkbox data from form into email
Hello all,First, i'd like to thank everyone who responded to my previous posts regarding setting up an SMTP server for my php form. I ended up figuring it out and my form is up and functioning,
Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently it just leaves the file named as however the person has it named. But what I would like to do is
Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and string function don't seem to work because they consider the Greek alphabet letters as part of the A-Z
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...Code: $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME'
Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.