Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div ng-app ng-init="checked = false">
- <form class="form-signin inventario" action="login2.php" method="post" name="form">
- <label for="username">Usuario</label>
- <input class="form-styling" type="text" name="username" id="user" placeholder="Type here"/>
- <label for="password">Contraseña</label>
- <input class="form-styling" type="text" name="password" id="pass" placeholder="Type here"/>
- <div class="btn-animate">
- <button type="submit">Enviar</button>
- <a class="btn-signin" id="submit_text" type="submit"> Acceder</a>
- </div>
- </form>
- </div>
- </div>
- $connect = mysqli_connect("localhost", "user", "pass", "dbname");
- $username = $_GET['user'];
- $password = $_GET['pass'];
- $sql1 = "SELECT * from usuarios WHERE user like '%".$_POST["1user"]."%'";
- $sql2 = "SELECT * from usuarios WHERE pass like '%".$_POST["2user"]."%'"; //search
- $result1 = mysqli_query($connect, $sql1);
- $result2 = mysqli_query($connect, $sql2);
- if ($username == $result1 && $password == $result2)
- {
- echo "<script>"."window.alert('VALID USER')"."</script>";
- echo "<script>"."window.location.href='/milocalpage.html'"."</script>";
- }
- else
- {
- echo "INVALID USER, Go Back, EERROORR";
- }
- /*
- if(mysqli_num_rows($result) > 0)
- {
- while($row = mysqli_fetch_array($result))
- {
- }
- }
- else
- {
- echo "Account Not Found";
- }
- */
- </div>
Add Comment
Please, Sign In to add comment