Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <html>
- <head>
- <title>Testaan toimiiko ;3</title>
- </head>
- <style type="text/css">
- html, body {
- height: 100%;
- margin: 0;
- padding: 0;
- }
- img#bg {
- position:fixed;
- top:0;
- left:0;
- width:100%;
- height:100%;
- }
- #content {
- position:relative;
- z-index:1;
- }
- </style>
- <!--[if IE 6]>
- <style type="text/css">
- html { overflow-y: hidden; }
- body { overflow-y: auto; }
- #bg { position:absolute; z-index:-1; }
- #content { position:static; }
- </style>
- <![endif]-->
- <body>
- <img src="squid.jpg" alt="background image" id="bg" />
- </body>
- <center>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <div id="content">
- <form action="kirjautuminen.php" method="post">
- <input type="text" name="kayttajanimi" value="Käyttäjänimi"><br>
- <input type="password" name="salasana" value="Salasana"><br><br>
- <input type="submit" name="nappi1" value="Kirjaudu Sisään"><br><br>
- </form>
- <?php
- $_SESSION['user'] = $_POST['kayttajanimi'];
- $_SESSION['pwd'] = $_POST['salasana'];
- if (isset($_POST['nappi1'])) {
- if(($_SESSION['user'] == admin) and ($_SESSION['pwd'] == 1234)) {
- echo '<html><head><META HTTP-EQUIV="refresh" CONTENT="3;URL=sivu1.php"></head>
- <font color="black"><b>Kirjautuminen onnistui!</font></b><br><font color="black"><b>Odota hetki...</font></b></html>';
- }
- else {
- echo '<font color="red">Kirjautuminen epäonnistui!</font>';
- }
- }
- else
- echo "";
- ?>
- </div>
- </center>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement