Posted by Proximus on 06/18/07 16:14
hello, at first, sorry on my bad english.
i have a problem.
on
index.php:
<?
$include=array(
"link"=>"link.html",
);
$stranica="prva.html";
if(isset($_GET)){
$str=array_keys($_GET);
if(array_key_exists($str[0],$include)){
$stranica=$include[$str[0]];
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<li><a href="index.php?pocetna">Pocetna</a></li>
<li><a href="index.php?link">linkovi</a></li><br>
<?php include($stranica); ?>
</body>
</html>
link.html:
<?php
$moj_naslov='linkovi';
?>
<h2>Linkovi</h2>
prva.html:
<?php
$moj_naslov='prva stranica';
?>
<h2>Prva Stranica</h2>
how in index.php to change
<title>Untitled Document</title>
into <title>linkovi</title> or <title>prva stranica</title> depending what
is loaded
"moj_naslov" means "my title"
thanks from Croatia.
[Back to original message]
|