Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- Uzytkownik zalogowany!<br>
- <center>
- <fieldset>
- <table>
- <form action="xd">
- Technik:
- <select name="Technik">
- <option></option>
- <option> Technik Informatyk</option>
- <option>Fototechnik</option>
- <option>Teleinformatyk</option>
- </select>
- </form>
- <br>
- <form action="xd">
- Czas:
- <select name="Czas">
- <option></option>
- <option>Uslugi na rok</option>
- <option>Uslugi na 2lata</option>
- </select>
- </form>
- <br>
- <form action="xd">
- Zlecenia:
- <select name="Zlecenie">
- <option></option>
- <option>Pakiet Podstawowy</option>
- <option>Pakiet Sredni</option>
- <option>Pakiet Premium</option>
- </select>
- </form>
- </table>
- Uwagi:<br>
- <textarea name="nazwa" cols="10" rows="5">Brak uwag</textarea><br>
- <button type="rodzaj">Wyslij</button>
- </fieldset>
- </body>
- </html>
- <?php
- session_start();
- $userinfo = array(
- 'user1'=>'password1',
- 'user2'=>'password2',
- 'user3'=>'password3',
- );
- if(isset($_GET['logout'])) {
- $_SESSION['username'] = '';
- header('Location: ' . $_SERVER['PHP_SELF']);
- }
- if(isset($_POST['username'])) {
- if($userinfo[$_POST['username']] == $_POST['password']) {
- $_SESSION['username'] = $_POST['username'];
- header('Location:stronka.html ');
- }else {
- echo "<p>error logging in</p>";
- }
- }
- ?>
- <head>
- <title>Login</title>
- </head>
- <body>
- <?php if($_SESSION['username']): ?>
- <p>You are logged in as <?=$_SESSION['username']?></p>
- <p><a href="?logout=1">Logout</a></p>
- <?php endif; ?>
- <form name="login" action="" method="post">
- Username: <input type="text" name="username" value="" /><br />
- Password: <input type="password" name="password" value="" /><br />
- <input type="submit" name="submit" value="Submit" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement