Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( empty($_POST) )
- {
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset='utf-8'>
- <title>MayBe</title>
- <style type='text/css'>
- form {
- width: 450px;
- margin-right: auto;
- margin-left: auto;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 13px;
- color: #333333;
- padding: 10px;
- margin-top: 50px;
- border: thin solid #AEAEAE;
- background-color: #a1bdd5;
- }
- legend {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 16px;
- font-weight: bold;
- color: #333333;
- padding: 2px;
- }
- label {
- margin: 10px;
- }
- .submit {
- margin-left: 50px;
- }
- .link {
- margin-left: 350px;
- }
- </style>
- </head>
- <body>
- <form id='form1' name='form1' method='post'>
- <fieldset>
- <legend>Area riservata</legend>
- <p> </p>
- <p>
- <label for='textfield'><strong>Username</strong></label>
- <input type='text' name='username' tabindex='10' id='textfield' />
- </p>
- <p> </p>
- <p>
- <label for='label'><strong>Password</strong></label>
- <input type='password' name='password' id='label' />
- </p>
- <p> </p>
- <p>
- <label for='Submit'></label>
- <input name='Submit' type='submit' class='submit' id='Submit' tabindex='30' value='Invia' />
- </p>
- </fieldset>
- </form>
- </body>
- </html>
- <?php
- }
- else
- {
- $username = $_POST['username'];
- $password = $_POST['password'];
- if ( ($username == "admin" and $password == "admin")
- or ($username == "matteotti" and $password == "matteotti111")
- or ($username == "marconi" and $password == "marconi123") )
- {
- <?php phpinfo(); ?>
- }
- else
- {
- echo "<center><h2><font color=#FF0000><h2>Accesso negato.</font></h2><br>Le credenziali inserite non risultano valide.<br><a href=\"javascript:history.go(-1)\">Clicca qui per tornare al form e reinserire username e password.</a></center>";
- die;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement