again thank you for the reply
i did as instructed, and changed the pages using ['host_ad'] to ['sess_host_ad'] the problem still occured however
i then decided to experiment slightly and stopped calling the $_SESSION var in that script, and now it works perfectly again.
here is the script causing the problem as it stands now (error free)
<?php
function menu($page) {
// Array Of Arrays Of Main Urls
// Format - (Link Mask, Url, Rollover Effect (1=On,2=Off), Open Link In New Window, Title)
$array = array("1" =>
array("1" => "Home", "/index.php", 1, 0, "Home"),
array("1" => "Trick-Tips", "/trick-tips.php", 1, 0, "Skateboarding Trick-Tips"),
array("1" => "Games", "/games.php", 1, 0, "Flash And Java Games"),
array("1" => "Cheats", "/cheats.php", 1, 0, "PS2/GC/GBA/XBOX Cheats"),
array("1" => "Waypoints", "/waypoints.php", 1, 0, "Download Counter-Strike PODBot Waypoints"),
array("1" => "Forum", "/forum/", 1, 1, "Forum"),
array("1" => "Blogs", "/blogs.php", 1, 0, "Blogs (Web Logs)"),
array("1" => "Jokes", "/jokes.php", 1, 0, "Jokes"),
array("1" => "Poll", "/poll.php", 1, 0, "Poll")
);
$listnum = count($array) + 1; // Add One To Tell The For Loops When To Stop
for ($i=1;$i<$listnum;$i++) {
if ($i == $page) {
// Change The Rollover Effect To Suit The Page
$array[$i][3] = 2;
}
}
// Start Putting Together The Menu
$display = "";
$display .= "<td width=\"2\"
style=\"border-bottom-style: solid; border-bottom-width: 1\"
bordercolor=\"#111111\"></td>\n";
for ($i=1;$i<$listnum;$i++) {
// Decide Wether Or Not The Item Is Selected
if ($array[$i][3] == 2) {
$rollover = "class=\"highlight\" bordercolor=\"#111111\"";
}
else {
$rollover = "class=\"normal\" onMouseOver=\"this.className='highlight'\" onMouseOut=\"this.className='normal'\" bordercolor=\"#111111\"";
}
// If Url Equals 0 Then Dont Create A Hyperlink
if ($array[$i][2] == "0") {
$display .= "<td align=\"center\" ".$rollover." ";
$display .= "><p><font class=\"user\">".$array[$i][1]."</td>\n";
}
else {
$display .= "<td align=\"center\" ".$rollover." ";
$display .= "><p style=\"margin-top: 7; margin-bottom: 7;\"><a href=\"".$array[$i][2]."\" title=\"".$array[$i][5]."\" class=\"nav\" ";
// Open Link In New Window
if ($array[$i][4] == 1) {
$display .= "target=\"_BLANK\"";
}
$display .= ">".$array[$i][1]."</a></td>\n";
}
$display .= "<td width=\"2\"
style=\"border-bottom-style: solid; border-bottom-width: 1\"
bordercolor=\"#111111\"></td>\n";
}
// Finish Menu
// Return $display For Echoing
return $display;
}
?>
the array at the top of the page is what i had changed in order to fix it, here is what it looked like previously
<?php
$array = array("1" =>
array("1" => "Home", "/index.php", 1, 0, $_SESSION['sess_host_ad']."'s Home"),
array("1" => "Trick-Tips", "/trick-tips.php", 1, 0, "Skateboarding Trick-Tips"),
array("1" => "Games", "/games.php", 1, 0, "Flash And Java Games"),
array("1" => "Cheats", "/cheats.php", 1, 0, "PS2/GC/GBA/XBOX Cheats"),
array("1" => "Waypoints", "/waypoints.php", 1, 0, "Download Counter-Strike PODBot Waypoints"),
array("1" => "Forum", "http://www.".$_SESSION['sess_host_ad']."/forum/", 1, 1, $_SESSION['sess_host_ad']."'s forum"),
array("1" => "Blogs", "http://www.".$_SESSION['sess_host_ad']."/blogs.php", 1, 0, $_SESSION['sess_host_ad']."'s Blogs (Web Logs)"),
array("1" => "Jokes", "http://www.".$_SESSION['sess_host_ad']."/jokes.php", 1, 0, $_SESSION['sess_host_ad']."'s Jokes"),
array("1" => "Poll", "http://www.".$_SESSION['sess_host_ad']."/poll.php", 1, 0, $_SESSION['sess_host_ad']."'s Poll")
);
?>
in the end everything works perfectly, thank you btw, i'll make sure to click 'resolved' when i try to get this last question out of u 🙂
why from doing the above has the problem gone?
in other words why does $_SESSION['sess_host_ad'] contain
theutherfish.comAXjv Èáw +_4‰kv üiv †w host_ad‘ èþÀèþÀ™ ˜Hvt h‹v „I@$æs II@<æs IÙCJ;]ï¿vt JÙCJB
instead of
theutherfish.com
thank you, Jon