Firstly, thank you for the help.
I tried to simplify my initial question but it seems that there may be additional details I should have added.
I have an INCLUDE; not on
main.php but on a page within one of its frames -
main-left.php (however, this seems no to be the problem).
What I'm trying to do is to pass values through URLs so that
main.php renders differently according to them.
index.htm is supposed simply to set the initial value of
pg (
'home').
Code: Select all
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=main.php?pg=home">
</head>
main.php should render different frames depending on the value of
pg
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
session_start() ;
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>AAA<?php echo $_GET['pg'] ; ?>BBB</title>
</head>
<FRAMESET ROWS="*,2,500,*" BORDER="0" FRAMEBORDER="no" FRAMESPACING="0">
<FRAME SRC="top.htm" NAME="top" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
<FRAME SRC="h.htm" NAME="top" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
<FRAMESET COLS="758,2,*" BORDER="0" FRAMEBORDER="no" FRAMESPACING="0">
<FRAME SRC="main-left.php?pg=<?php echo $_GET['pg'] ; ?>" NAME="main" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
<FRAME SRC="v.htm" NAME="main" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
<FRAME SRC="main-right.php?pg=<?php echo $_GET['pg'] ; ?>" NAME="main" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
</FRAMESET>
<FRAME SRC="bottom.htm" NAME="bottom" SCROLLING="no" NORESIZE MARGINWIDTH=0 MARGINHEIGHT=0>
</FRAMESET>
<noframes>
</noframes>
</html>
main-left.php has on its left side a menu (which renders OK) and an image on the right.
The problem is that the image does not appear - just the string
image (because of the ALT)
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
session_start() ;
/* require('txt.php') ; */
$image['home'] = "img/ines558.gif" ;
$image['history'] = "img/ines.jpg" ;
$image['extra'] = "img/ARM-BEMF-1999.jpg" ;
$image['ensembles'] = "img/CMDH.jpg" ;
$image['teaching'] = "img/flautas_em_manuais.gif" ;
$image['music'] = "img/RehearsalGerman18thC.gif" ;
$image['contact'] = "img/suonatrice2.jpg" ;
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="style.php" title="inesdavena_css" media="screen,projection" />
</head>
<body>
<div id="wrap">
<div id="leftside">
<img src="img/ines_logo220-C0.gif" alt="Inês" width="220" height="124" border="2" align="top"/>
<div id="menu">
<?php if ($pg == "history") echo $menu[$pg][1]; else echo $menu['history'][0]; ?>
<?php if ($pg == "extra") echo $menu[$pg][1]; else echo $menu['extra'][0]; ?>
<?php if ($pg == "ensembles") echo $menu[$pg][1]; else echo $menu['ensembles'][0]; ?>
<?php if ($pg == "teaching") echo $menu[$pg][1]; else echo $menu['teaching'][0]; ?>
<?php if ($pg == "music") echo $menu[$pg][1]; else echo $menu['music'][0]; ?>
<?php if ($pg == "contact") echo $menu[$pg][1]; else echo $menu['contact'][0]; ?>
<?php if ($pg == "home"); else echo $menu['home'][0]; ?>
</div>
</div>
<div id=image-main>
<?php echo $_GET['pg']; ?>
<img src="<?php echo $image[$pg] ; ?>" alt="legend"/>
<!-- <img src="img/ines558.gif" alt="<?php echo $pg ; ?>aaa"/> -->
</div>
</div>
</body>
</html>
Note that I outcommented the INCLUDE and set all values of $image[] for testing but nothing happened.
The include is used to fill different values of $image[]