
Chcę zrobić sobie stronkę w jednym pliku na zasadzie, że w jednej części okna dla przykładu będzie wyświetlona zmienna $opis. Wartość tej zmiennej chcę przypisywać za pomocą adresu. Po kliknięciu na odpowiednie linki będzie ona miała wartości zmiennych $opis1, $opis2 albo $opis3. Tutaj przykładowy, prosty plik:
Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Tytuł dokumentu</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="malaba@o2.pl" />
<meta http-equiv="Content-Language" content="pl" />
<meta name="Author" content="Michał" />
<link rel="stylesheet" href="styl.css" type="text/css" />
</head>
<body>
<table>
<tr>
<th>Link</th>
<th>Opis</th>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 1</a></td>
<td rowspan="3">
<?php
$opis1 = "To jest opis 1.";
$opis2 = "To jest opis 2.";
$opis3 = "To jest opis 3.";
echo $_REQUEST['opis'];
?>
</td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 2</a></td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 3</a></td>
</tr>
</table>
</body>
</html>
" title="Zobacz w manualu php" target="_manual">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Tytuł dokumentu</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="malaba@o2.pl" />
<meta http-equiv="Content-Language" content="pl" />
<meta name="Author" content="Michał" />
<link rel="stylesheet" href="styl.css" type="text/css" />
</head>
<body>
<table>
<tr>
<th>Link</th>
<th>Opis</th>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 1</a></td>
<td rowspan="3">
<?php
$opis1 = "To jest opis 1.";
$opis2 = "To jest opis 2.";
$opis3 = "To jest opis 3.";
echo $_REQUEST['opis'];
?>
</td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 2</a></td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 3</a></td>
</tr>
</table>
</body>
</html>
</a>
<html>
<head>
<title>Tytuł dokumentu</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="malaba@o2.pl" />
<meta http-equiv="Content-Language" content="pl" />
<meta name="Author" content="Michał" />
<link rel="stylesheet" href="styl.css" type="text/css" />
</head>
<body>
<table>
<tr>
<th>Link</th>
<th>Opis</th>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 1</a></td>
<td rowspan="3">
<?php
$opis1 = "To jest opis 1.";
$opis2 = "To jest opis 2.";
$opis3 = "To jest opis 3.";
echo $_REQUEST['opis'];
?>
</td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 2</a></td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 3</a></td>
</tr>
</table>
</body>
</html>
" title="Zobacz w manualu php" target="_manual">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Tytuł dokumentu</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="malaba@o2.pl" />
<meta http-equiv="Content-Language" content="pl" />
<meta name="Author" content="Michał" />
<link rel="stylesheet" href="styl.css" type="text/css" />
</head>
<body>
<table>
<tr>
<th>Link</th>
<th>Opis</th>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 1</a></td>
<td rowspan="3">
<?php
$opis1 = "To jest opis 1.";
$opis2 = "To jest opis 2.";
$opis3 = "To jest opis 3.";
echo $_REQUEST['opis'];
?>
</td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 2</a></td>
</tr>
<tr>
<td><a href="index.php?opis=">Opis 3</a></td>
</tr>
</table>
</body>
</html>
</a>
Co powinno być w adresie po "=" i ew. jakieś inne dopiski w kodzie?

Pozdrawiam z góry dzięki za wyrozumiałość
