Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if (isset($_POST['username'])) {
- include_once("dbfontnnect.php");
- $usname = strip_tags($_POST['username']);
- $paswd = strip_tags($_POST['password']);
- $usname = mysqli_real_escape_string($dbCon, $usname);
- $paswd = mysqli_real_escape_string($dbCon, $paswd);
- $paswd = md5($paswd);
- $row = $dbCon->query("SELECT username, password FROM co WHERE username = '".$usname."' AND password = '".$paswd."'LIMIT 1")->fetch_array(MYSQLI_BOTH);
- if(!isset($row)) {
- echo "<h3>הפרטים שהזנת הנם שגויים, אנא נסה שנית.</h3>";
- }else {
- $uid = $row[0];
- $dbUsname = $row[1];
- $dbPassword = $row[2];
- header("Location: home.php");
- }
- }
- ?>
- <html>
- <body background="https://i.imgsafe.org/ed7d8b69c3.jpg">
- <center>
- <form id="form" action="index.php" method="post" enctype="multipart/form-data">
- <font size=12 color=white face=alef>
- <br />
- <br />
- <br />
- <br />
- username:<input type="text" name="username">
- <br />
- password:<input type="password" name="password">
- <br />
- <input type="submit" name="button1" value="Log in" style="background-color: c61f3b; /* Green */
- border: none;
- color: white;
- padding: 20px 34px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 25px;"> </font>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement