php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33465 submenu wil not work
Submitted: 2005-06-24 13:30 UTC Modified: 2005-06-24 13:38 UTC
From: dschol at rocmb dot nl Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.0.4 OS: Linux (Fedora core 4 and SME 6.5
Private report: No CVE-ID: None
 [2005-06-24 13:30 UTC] dschol at rocmb dot nl
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&euml;n - 2000</a> | 

<a href='?submenulink=pages/brazilie.php&submenu=vakantie'>Brazili&euml;  -2001</a> | 

<a href='?submenulink=pages/mexico.php&submenu=vakantie'>Mexico - 2002</a> |

<a href='?submenulink=pages/indonesie1.php&submenu=vakantie'>Indonesi&euml; - 2003</a> |

<a href='?submenulink=pages/indonesie2.php&submenu=vakantie'>Indonesi&euml; - 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>&nbsp;</td>

    <td width="800" height="120"><img src="images/banner.gif" width="800" height="120" /></td>

    <td>&nbsp;</td>

  </tr>

  <tr>

    <td>&nbsp;</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>&nbsp;</td>

  </tr>

  <tr>

    <td>&nbsp;</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>&nbsp;</td>

  </tr>

  <tr>

    <td>&nbsp;</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>&nbsp;</td>

  </tr>

  <tr>

    <td>&nbsp;</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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-24 13:38 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 12:00:01 2026 UTC