Files from 25-03-26 and added missing Files
This commit is contained in:
29
Zweites Jahr/sessions/session_3.php
Executable file
29
Zweites Jahr/sessions/session_3.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Sessions in PHP: Schritt 3</title>
|
||||
</head>
|
||||
<h1>Sessions in PHP</h1>
|
||||
<h2>Schritt 3</h2>
|
||||
<body>
|
||||
<?php
|
||||
session_start(); //Eine Sitzung beginnen
|
||||
$sId=session_id(); //Auslesen der SessionID
|
||||
|
||||
|
||||
//Ausgabe von Werten der superglobalen Variable Session
|
||||
//Alle Werte immer noch da
|
||||
echo "Hallo $_SESSION[vorname] $_SESSION[nachname],
|
||||
du bist $_SESSION[alter] Jahre alt, siehst aber aus wie 32!<br>";
|
||||
|
||||
|
||||
|
||||
echo "SID: $sId<br>";
|
||||
echo "<a href ='session_4.php'><br>zur nächsten Seite</a>";
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user