#33465 [NEW]: submenu wil not work
| From: | dschol at rocmb dot nl | Date: | Fri, 24 Jun 2005 11:30:15 +0000 |
| Subject: | #33465 [NEW]: submenu wil not work | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-80964@lists.php.net to get a copy of this message | ||
From: dschol at rocmb dot nl
Operating system: Linux (Fedora core 4 and SME 6.5
PHP version: 5.0.4
PHP Bug Type: Variables related
Bug description: submenu wil not work
Description:
------------
When I try this script on a server with PHP, older then version 5 it work
perfect. But when I try it on Fedora Core 4 or SME 6.5. The PHP code will
not work.
Is this a version problem??
The website where page works is: dschol.barhamonline.com
click on a link and the submenu will change. This is how is should work.
But when I try this with the other servers with the new version of PHP
nothing happens.
Is this a bug??
I included the entire code, so you can test it on your server.
I hope that I can help you making your product even better.
Greetings, David Schol.
Reproduce code:
---------------
?php
$home = "Welkom op het Weblog van David Schol.";
$persoonlijk = "<a
href='?submenulink=pages/wiebenik.php&submenu=persoonlijk'>Wie ben ik</a>
|
<a href='?submenulink=pages/werk.php&submenu=persoonlijk'>Werk</a> |
<a href='?submenulink=pages/cv.php&submenu=persoonlijk'>CV</a> |
<a
href='?submenulink=pages/cursussen.php&submenu=persoonlijk'>Cursussen</a>
|
<a
href='?submenulink=pages/werkervaring.php&submenu=persoonlijk'>Werkervaring</a>";
$vakantie = "<a
href='?submenulink=pages/pyreneen.php&submenu=vakantie'>Pyreneën -
2000</a> |
<a href='?submenulink=pages/brazilie.php&submenu=vakantie'>Brazilië
-2001</a> |
<a href='?submenulink=pages/mexico.php&submenu=vakantie'>Mexico - 2002</a>
|
<a
href='?submenulink=pages/indonesie1.php&submenu=vakantie'>Indonesië -
2003</a> |
<a
href='?submenulink=pages/indonesie2.php&submenu=vakantie'>Indonesië -
2004</a> |
<a href='?submenulink=pages/frankrijk.php&submenu=vakantie'>Frankrijk -
2005</a>";
$ictlyceum = "<a
href='?submenulink=pages/smi.php&submenu=ictlyceum'>onSMI</a> |
<a href='?submenulink=pages/mbi.php&submenu=ictlyceum'>onMBI</a> |
<a href='?submenulink=pages/icb.php&submenu=ictlyceum'>onICB</a>";
$contact = "<a
href='?submenulink=pages/route.php&submenu=contact'>Route</a> |
<a href='?submenulink=pages/email.php&submenu=contact'>E-mail</a> |
<a href='?submenulink=pages/contact.php&submenu=contact'>Contact
formulier</a>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>David's Weblog</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<script language="JavaScript" type="text/javascript"
src="scripts/basisscript.js"></script>
<link rel="stylesheet" href="/style/basisstyle.css"
type="text/css">
<script language="Javascript">
function hoogte()
{
if (self.screen) {
width = screen.width
height = screen.height
}
else if (self.java) {
var javakit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = javakit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else {
width = height = '?'
}
var over = parseInt(height) - 185;
return over;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000"
vlink="#000000"
alink="#000000"
leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<?php
// eigenlijk --> (pagina hoogte) min 185
$re = 768-385;
?>
<table width="100%" border="0" cellpadding="0"
cellspacing="0"
bgcolor="#FFFFFF">
<tr>
<td> </td>
<td width="800" height="120"><img src="images/banner.gif"
width="800"
height="120" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td width="800" height="25" bgcolor="#0033FF"><div
align="center">
<span class="hoofdmenu">
<a href="?submenu=home">Home</a>
| <a href="?submenu=persoonlijk">Persoonlijk</a> | <a
href="?submenu=vakantie">Vakantie</a>
| <a href="?submenu=ictlyceum">ICT-Lyceum</a> | <a
href="?submenu=gastenboek">Gastenboek</a>
| <a href="?submenu=contact">Contact</a>
</span></div></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td width="800" height="20" bgcolor="#0099FF"
class="hoofdmenu">
<div align="center">
<span class="submenu">
<?php
//if($submenu == "vakantie") { echo $vakantie; } else { echo $home; }
if($submenu == "persoonlijk") {
echo $persoonlijk;
}
if ($submenu == "vakantie") {
echo $vakantie;
}
if ($submenu == "ictlyceum") {
echo $ictlyceum;
}
if ($submenu == "contact") {
echo $contact;
}
if ($submenu == null || $submenu == "home"){
echo $home;
}
?>
</span>
</div>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td bgcolor="#CCCCCC" class="mainFrame" width="800">
<iframe width="800" height="<?php echo $re; ?>"
scrolling="yes"
frameborder="0"
src="<?php if($submenulink != null){ echo $submenulink; } else { echo
'pages/nietgevonden.php'; } ?>"></iframe> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td width="800" height="20" bgcolor="#0099FF">
<div align="center"><span class="submenu">
<script language="JavaScript" type="text/javascript"
class="footer">
document.write('Het is vandaag: ' + tijd());
</script>
</span></div></td>
</tr>
</table>
</body>
</html>
Expected result:
----------------
Submenu bar must change, when I click a link in the main menu (above).
It does in different versions of PHP, but not in PHP version 5 and higher.
Actual result:
--------------
Submenu bar must change, but notting happens.
It does in different versions of PHP, but not in PHP version 5 and higher.
--
Edit bug report at http://bugs.php.net/?id=33465&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33465&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33465&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33465&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33465&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33465&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33465&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33465&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33465&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33465&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33465&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33465&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33465&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33465&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33465&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33465&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33465&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33465&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33465&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33465&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33465&r=mysqlcfg