Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dvprog_08 [2019-10-10 14:10] Daniel Viström |
dvprog_08 [2022-07-18 13:20] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Genomgång $_SESSION ====== | + | ====== Genomgång |
<code php> | <code php> | ||
Line 19: | Line 19: | ||
// För att slippa felmeddelande första gången sidan laddas och inget är inmatat | // För att slippa felmeddelande första gången sidan laddas och inget är inmatat | ||
if(isset($_POST[' | if(isset($_POST[' | ||
- | $_SESSION[' | ||
- | | ||
if($_POST[' | if($_POST[' | ||
$_SESSION[' | $_SESSION[' | ||
+ | } else { | ||
+ | $_SESSION[' | ||
} | } | ||
} | } | ||
Line 49: | Line 49: | ||
- destroy the session: session_destroy(); | - destroy the session: session_destroy(); | ||
*/ | */ | ||
- | |||
- | ?> | ||
</ | </ |