Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lab4_code [2016-11-30 22:38] Joakim Forsgren |
lab4_code [2022-07-18 13:20] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
highlight_file(' | highlight_file(' | ||
</ | </ | ||
- | |||
- | <code php> | ||
- | <?php | ||
- | include_once ' | ||
- | |||
- | // Om man har prövat att logga in. | ||
- | if (!empty($_POST[' | ||
- | // Kollar EMail och Password, bör bara finnas en... | ||
- | $query = " | ||
- | $result = mysqli_query($link, | ||
- | if (mysqli_num_rows($result) != 1) { | ||
- | header(' | ||
- | exit(); | ||
- | } | ||
- | // Nu har vi en OK inloggning! | ||
- | // Sätter alla session variabler och går till sidan start.php. | ||
- | $row = mysqli_fetch_assoc($result); | ||
- | $_SESSION[' | ||
- | $_SESSION[' | ||
- | $_SESSION[' | ||
- | header(' | ||
- | exit(); | ||
- | } | ||
- | |||
- | </ | ||
- | |||
=== Själva sidan (lab4.php) === | === Själva sidan (lab4.php) === |