Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if (isset($_POST['uname'])){
- $uname = $_POST['uname'];
- $pass = $_POST['pass'];
- if ($uname=="lawrence" && $pass=="lawrencepogi"){
- $_SESSION['kahitano']='walang kwenta';
- }
- else
- echo "Username or Password does not match!";
- }
- if(isset($_SESSION['kahitano'])){
- echo "<table border =\"1\" style='border-collapse: collapse'>";
- for ($row=1; $row<=10; $row++){
- $color = "#377d7a";
- if ($row%2) $color = "#0000";
- echo"<tr style = \"background-color:$color\">";
- for ($col=1; $col<=10; $col++){
- $answer = $row * $col;
- echo"<td>$answer</td>";
- }
- }
- echo "</table>";
- }
- else
- { ?>
- <form action="index.php" method="post">
- <label>Username: <input type="text" name="uname" placeholder="Username"></label><br><br>
- <label>Password: <input type="password" name="pass" placeholder="Password"></label><br><br>
- <input type="Submit" name="Login"><br>
- </form>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement