Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DS1820
Fork of J_HTTP_Client by
Diff: ForServer/login_page.php
- Revision:
- 0:d90e1f7bda1f
- Child:
- 1:920482bc63f4
diff -r 000000000000 -r d90e1f7bda1f ForServer/login_page.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ForServer/login_page.php Sun May 13 16:31:13 2018 +0000
@@ -0,0 +1,135 @@
+<?php
+ session_start();
+
+ $server = "sql2.webzdarma.cz";
+ $user = "johnkwzcz9067";
+ $pass = "Nucleo144";
+ $db = "johnkwzcz9067";
+
+
+ $mysql = mysql_connect($server, $user, $pass); //Join to MySQL
+ mysql_select_db($db);
+
+ if(isset( $_POST["submit"]))
+ {
+ $uname = $_POST["username"];
+ $upass = $_POST["password"];
+ $u_name = mysql_fetch_array(mysql_query('SELECT u_name FROM users WHERE u_name="'.$uname.'" AND u_password="'.$upass.'" '));
+ $u_pass = mysql_fetch_array(mysql_query('SELECT u_password FROM users WHERE u_name="'.$uname.'" AND u_password="'.$upass.'" '));
+
+ if($uname != $u_name['u_name'] and $upass != $u_pass['u_password'])
+ {
+ $messge = "Invalid Login!";
+ }
+ else
+ {
+ $_SESSION["uname"] = $uname;
+ header('Location: control.php');
+ }
+ }
+?>
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset= "utf-8">
+ <title>Login</title>
+ <style>
+ body
+ {
+ margin: 0;
+ padding: 0;
+ font-family: sans-serif;
+ /*background: url(bg.jpg);*/
+ background-size: cover;
+ }
+ .box
+ {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%,-50%);
+ width: 400px;
+ padding: 40px;
+ background: rgba(0,0,0,.8);
+ box-sizing:border-box;
+ box-shadow: 0 15px 25px rgba(0,0,0,.5);
+ border-radius: 10px;
+ }
+ .box h2
+ {
+ margin: 0 0 30px;
+ padding: 0;
+ color: #fff;
+ text-align: center;
+ }
+ .box .mess h3
+ {
+ margin: 0 0 20px;
+ padding: 0;
+ color: #03a9f4;
+ text-align: center;
+ }
+ .box inputBox
+ {
+ position: relative;
+ }
+ .box .inputBox input
+ {
+ width: 100%;
+ padding: 10px 0;
+ font-size: 16px;
+ color: #fff;
+ letter-spacing: 1px;
+ margin-bottom: 30px;
+ border: none;
+ border-bottom: 1px solid #fff;
+ outline: none;
+ background: transparent;
+ }
+ .box .inputBox label
+ {
+ padding: 10px 0;
+ font-size:16px;
+ color: #fff;
+ pointer-events: none;
+ }
+
+ .box input[type="submit"]
+ {
+ background: transparent;
+ border: none;
+ outline: none;
+ color: #fff;
+ background: #03a9f4;
+ padding: 10px 30px;
+ cursor: pointer;
+ border-radius: 5px;
+ }
+ .box input[type="submit"]:hover
+ {
+ cursor: pointer;
+ background: #92b6d5;
+ color: #fff;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="box">
+ <h2>Login</h2>
+ <form method="POST" action="#">
+ <div class= "mess">
+ <h3><?php if(isset($messge)) { echo $messge; } ?></h3>
+ </div>
+ <div class= "inputBox">
+ <label for="username">Username</label>
+ <input type="text" name="username" placeholder="Enter your User name" required="">
+ </div>
+ <div class= "inputBox">
+ <label for="password">Password</label>
+ <input type="password" name="password" placeholder="Enter your Password" required="">
+ </div>
+ <input type="submit" name="submit" value="submit">
+ </form>
+ </div>
+ </body>
+</html>
\ No newline at end of file
