Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- session_start();
- if(iSset($_SESSION['zalogowany'])){
- header("location:glowna.php");
- echo "test";
- }
- ?>
- <html>
- <head>
- <title>Sesja</title>
- <meta charset="utf-8">
- <style>
- div.container{
- height: 10em;
- position: relative;
- }
- div.container p{
- font-size: 30px;
- margin: 0;
- position: absolute;
- top: 80%;
- left: 50%;
- margin-right: -50%;
- transform: translate(-50%, -50%);
- text-align: center;
- }
- input.button{
- width: 70px;
- height: 30px;
- font-size: 16px;
- }
- </style>
- </head>
- <body>
- <form action="" method="post">
- <div class="container">
- <p>
- WITAJ NA STRONIE GLOWNEJ <br>
- Login: <input type="text" name="loginuser"/> <br>
- Password: <input type="text" name="passworduser"/> <br><br>
- <input class="button" type="submit" name="button"/>
- </p>
- </div>
- </form>
- <?PHP
- if(isset($_POST['button'])){
- $login = "student";
- $password = "student";
- $loginuser = $_POST['loginuser'];
- $passworduser = $_POST['passworduser'];
- if($loginuser == $login && $passworduser == $password){
- header("location:glowna.php");
- }
- echo "$login";
- echo "$password";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement