Mam jeden plik index.php z kodem:
Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/url]">
<html>
<head>
<title>wysyłanie zamówienia</title>
<meta name="P. Jamorski" content="">
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">-->
<meta HTTP-EQUIV="Content-type" content="text/html; charset=Windows-1250">
<meta name="Authoring-tool" content="Notepad & Crimson Editor">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<?php
// zaczynam sesję
session_start();
session_register("konto","numer");
$konto = "sajan";
$numer = "0071";
$strona1 = "
<html><head>
<title>zamówienie klienta</title>
<link REL='stylesheet' href='style.css' type='text/css'>
<link REL='stylesheet' href='fitcorne.css' type='text/css'>
</head>
<body>
Użytkownik: $konto
<br>
Numer ID: $numer
<br><br>
<!-- przesylam te dane w sesji do drugiej strony -->
<a href='dalej.php'>prześlij</a>
</body></html>
";
echo $strona1;
?>
</body></html>
i drugi plik dalej.php z kodem :
Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/url]">
<html>
<head>
<title>wysyłanie zamówienia</title>
<meta name="P. Jamorski" content="">
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">-->
<meta HTTP-EQUIV="Content-type" content="text/html; charset=Windows-1250">
<meta name="Authoring-tool" content="Notepad & Crimson Editor">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<?php
session_start();
$strona1 = "
<html><head>
<title>zamówienie klienta</title>
<link REL='stylesheet' href='style.css' type='text/css'>
<link REL='stylesheet' href='fitcorne.css' type='text/css'>
</head>
<body>
Dane przesłane za pomocą sesji:<br><br>
Użytkownik: $konto
<br>
Numer ID: $numer
</body></html>
";
echo $strona1;
?>
</body></html>
"[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/url]">
<html>
<head>
<title>wysyłanie zamówienia</title>
<meta name="P. Jamorski" content="">
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">-->
<meta HTTP-EQUIV="Content-type" content="text/html; charset=Windows-1250">
<meta name="Authoring-tool" content="Notepad & Crimson Editor">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<?php
session_start();
$strona1 = "
<html><head>
<title>zamówienie klienta</title>
<link REL='stylesheet' href='style.css' type='text/css'>
<link REL='stylesheet' href='fitcorne.css' type='text/css'>
</head>
<body>
Dane przesłane za pomocą sesji:<br><br>
Użytkownik: $konto
<br>
Numer ID: $numer
</body></html>
";
echo $strona1;
?>
</body></html>
Problem w tym, że te wartości tych zmiennych z pierwszego pliku nie są przekazywane do tego drugiego pliku. Co trzeba zrobić żeby to działało?
Dzięki