Commit 35e77e94 by Ryo

Updated query_2.php and registration.php

parent 71111947
Showing with 5 additions and 625 deletions
......@@ -9,345 +9,8 @@ include('session_admin.php');
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Query Search Up Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css);
* {
box-sizing: border-box;
}
.header {
border: 1px solid #DE584F;
padding: 15px;
}
.social a {
text-align: center;
width: 52px;
height: 52px;
float: left;
background: #fff;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 0 50px rgba(0, 0, 0, 0.1);
border-radius: 24px;
margin: 0 10px 10px 0;
padding: 6px;
color: #000;
}
.twitter a:hover {
background: #00acee;
color: #fff;
}
.instagram a:hover {
background: #3f729b;
color: #fff;
}
.facebook a:hover {
background: #3b5998;
color: #fff;
}
.header {
border: 1px solid #DE584F;
padding: 15px;
}
.row::after {
content: "";
clear: both;
display: table;
}
/* Paralax animation*/
.parallax {
height: 100vh;
background-image: url(../Web-App/logo4-01.svg);
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center center;
}
.row::after {
content: "";
clear: both;
display: table;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
[class*="col-"] {
float: left;
padding: 15px;
}
/* This is allocating layout spaces for how the website is going to be allocated the spaces for different contencts. */
.col-1 {
width: 8.33%;
}
.col-2 {
width: 16.66%;
}
.col-3 {
width: 0;
}
.col-4 {
width: 33.33%;
}
.col-5 {
width: 41.66%;
}
.col-6 {
width: 50%;
}
.col-7 {
width: 58.33%;
}
.col-8 {
width: 66.66%;
}
.col-9 {
width: 100%;
text-align: center;
}
.col-10 {
width: 83.33%;
}
.col-11 {
width: 91.66%;
}
.col-12 {
width: 100%;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #111;
}
<link rel="stylesheet" type="text/css" href="css/query_2_style.css">
.active {
background-color: #DE584F;
}
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,600,400italic);
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
body {
font-family: "Roboto", Helvetica, Arial, sans-serif;
font-weight: 100;
font-size: 20px;
line-height: 40px;
color: #777;
height: 200vh;
background-image: linear-gradient(to top, gray, white 40%);
}
.container {
max-width: 600px;
margin: 0 auto;
position: relative;
}
#search input[type="departure"],
#search input[type="arrival"],
#search input[type="class"],
#search input[type="date"],
#search input[type="date"],
#search input[type="filters"],
#search button[type="submit"] {
font: 400 12px/16px "Roboto", Helvetica, Arial, sans-serif;
}
#search {
background: #F9F9F9;
padding: 25px;
margin: 15px 0;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
#search h3 {
display: block;
font-size: 30px;
font-weight: 300;
margin-bottom: 10px;
}
#search h4 {
margin: 5px 0 15px;
display: block;
font-size: 13px;
font-weight: 400;
}
fieldset {
border: medium none !important;
margin: 0 0 10px;
min-width: 100%;
padding: 0;
width: 100%;
}
#search input[type="departure"],
#search input[type="arrival"],
#search input[type="class"],
#search input[type="date"],
#search input[type="date"],
#search input[type="filters"] {
width: 100%;
border: 1px solid #ccc;
background: #FFF;
margin: 0 0 5px;
padding: 10px;
}
#search input[type="departure"]:hover,
#search input[type="arrival"]:hover,
#search input[type="class"],
#search input[type="date"]:hover,
#search input[type="date"]:hover,
#search input[type="filters"]:hover {
-webkit-transition: border-color 0.3s ease-in-out;
-moz-transition: border-color 0.3s ease-in-out;
transition: border-color 0.3s ease-in-out;
border: 1px solid #aaa;
}
#search button[type="submit"] {
cursor: pointer;
width: 100%;
border: none;
background: #4CAF50;
color: #FFF;
margin: 0 0 5px;
padding: 10px;
font-size: 20px;
}
#search button[type="submit"]:hover {
background: #43A047;
-webkit-transition: background 0.3s ease-in-out;
-moz-transition: background 0.3s ease-in-out;
transition: background-color 0.3s ease-in-out;
}
#search button[type="submit"]:active {
box-shadow: inset 0 1px rgba(0, 0, 0, 0.5);
}
#search input:focus,
#search textarea:focus {
outline: 0;
border: 1px solid #aaa;
}
::-webkit-input-placeholder {
color: #888;
}
:-moz-placeholder {
color: #888;
}
::-moz-placeholder {
color: #888;
}
:-ms-input-placeholder {
color: #888;
}
[class*="button7"] {
background-color: #DE584F;
}
.button7 {
font-weight: 700;
color: white;
text-decoration: none;
padding: .8em 2em calc(.8em + 3px);
border-radius: 3px;
background: #DE584F(64, 199, 129);
box-shadow: 0 -3px #DE584F(53, 167, 110) inset;
transition: 0.2s;
}
.button7:hover {
background: #DE584F(206, 211, 208);
}
.button7:active {
background: rgb(33, 147, 90);
box-shadow: 0 3px rgb(33, 147, 90) inset;
}
</style>
</head>
<body>
......@@ -397,55 +60,10 @@ include('session_admin.php');
<input type="submit" name="submit" class="button7" value="Search" />
</form>
</fieldset>
<?php
//This is only displayed if the user submitted the form
if (isset($_POST['flight_search'])){
echo "<h2>Results</h2><p>";
//If the user did not enter a search term, they receive an error
if ($_POST['Subject'] == ""){
echo "<p>Please select a subject";
exit;
}
// Otherwise we connect to the database
$con = mysqli_connect("anysql.itcollege.ee", "WT16", "iLtQlUerkT", "WT16");
// Check connection
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Subject = ($_POST["Subject"]);
}
$data = mysqli_query($con, "SELECT * FROM Contact WHERE Subject = '$Subject'");
//And display the results
while($row = mysqli_fetch_array( $data )) {
echo "$row[1]". " " ."$row[2]". " " . "$row[3]". " " . "$row[4]". " ";
echo "<br>";
}
//This counts the number or results. If there aren't any, it gives the user a "no match" message
$anymatches=mysqli_num_rows($data);
if ($anymatches == 0) {
echo "Sorry, but we can not find an entry to match your query<br><br>";
}
//And reminds the user what they searched for
echo "<b>Searched For:</b> " . "$find";
}
//break;
if (isset($_GET['Flight_Id#'])) {
$Flight_Id = $_GET['Flight_Id'];
echo $Flight_Id;
}
include('php_files/query_2_database.php');
?>
</div>
<!-- social media block -->
......
......@@ -3,226 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>payment</title>
<style>
* {
box-sizing: border-box;
}
.header {
border: 1px solid green;
padding: 15px;
}
.row::after {
content: "";
clear: both;
display: table;
}
<link rel="stylesheet" type="text/css" href="css/registration_style.css">
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
[class*="col-"] {
float: left;
padding: 15px;
border: 3px solid blue;
}
/* This is allocating layout spaces for how the website is going to be allocated the spaces for different contencts. */
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,600,400italic);
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
body {
font-family: "Roboto", Helvetica, Arial, sans-serif;
font-weight: 100;
font-size: 15px;
line-height: 30px;
color: #777;
background: #ffffff;
}
.container {
max-width: 400px;
width: 100%;
margin: 0 auto;
position: relative;
}
#registration input[type="first_name"],
#registration input[type="last_name"],
#registration input[type="username"],
#registration input[type="password"],
#registration button[type="submit"] {
font: 400 12px/16px "Roboto", Helvetica, Arial, sans-serif;
}
#registration {
background: #F9F9F9;
padding: 25px;
margin: 15px 0;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
#registration h3 {
display: block;
font-size: 30px;
font-weight: 300;
margin-bottom: 10px;
}
#registration h4 {
margin: 5px 0 15px;
display: block;
font-size: 13px;
font-weight: 400;
}
fieldset {
border: medium none !important;
margin: 0 0 10px;
min-width: 100%;
padding: 0;
width: 100%;
}
#registration input[type="first_name"],
#registration input[type="last_name"],
#registration input[type="username"],
#registration input[type="password"] {
width: 100%;
border: 1px solid #ccc;
background: #FFF;
margin: 0 0 5px;
padding: 10px;
}
#registration input[type="first_name"]:hover,
#registration input[type="last_name"]:hover,
#registration input[type="username"]:hover,
#registration input[type="password"]:hover {
-webkit-transition: border-color 0.3s ease-in-out;
-moz-transition: border-color 0.3s ease-in-out;
transition: border-color 0.3s ease-in-out;
border: 1px solid #aaa;
}
#registration button[type="submit"] {
cursor: pointer;
width: 100%;
border: none;
background: #4CAF50;
color: #FFF;
margin: 0 0 5px;
padding: 10px;
font-size: 20px;
}
#registration button[type="submit"]:hover {
background: #43A047;
-webkit-transition: background 0.3s ease-in-out;
-moz-transition: background 0.3s ease-in-out;
transition: background-color 0.3s ease-in-out;
}
#registration button[type="submit"]:active {
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
#registration input:focus,
#registration textarea:focus {
outline: 0;
border: 1px solid #aaa;
}
::-webkit-input-placeholder {
color: #888;
}
:-moz-placeholder {
color: #888;
}
::-moz-placeholder {
color: #888;
}
:-ms-input-placeholder {
color: #888;
}
</style>
</head>
<body>
......@@ -294,27 +76,7 @@ fieldset {
</form>
<?php
#echo "Insert new user";
// connect to the database
// Establishing Connection with Server by passing server_name, user_id and password as a parameter
$con = mysqli_connect("anysql.itcollege.ee", "WT16", "iLtQlUerkT", "WT16");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$data = mysqli_query($con, "INSERT INTO User_register (First_Name, Last_Name, username, Password)
VALUES ('$First_Name', '$Last_Name', '$username', '$Password')");
//mysql_query($sql1, $con);
mysqli_close($con);
echo "Your input:::::::::<br>";
echo "".$First_Name. "<br>";
echo "".$Last_Name. "<br>";
echo "".$username. "<br>";
echo "".$Password. "<br>";
include('php_files/registration_database.php');
?>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment