Commit 543bb4a2 authored by stephanie.smith's avatar stephanie.smith

final

parent 87156513
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>gallery</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div>
<header class="titlemain"><a href ="main.html" target="_blank">Overwatch League</a></header>
</div>
<div>
<ul><li><a href="login.html">login</a></li>
<li><a href="tournaments.html">Tournaments</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="teams.html">Teams</a></li>
</ul>
</div>
<div>
<h1 class="book">Your booked for your slot!</h1>
</body>
</html>
\ No newline at end of file
...@@ -18,31 +18,24 @@ ...@@ -18,31 +18,24 @@
<li><a href="teams.html">Teams</a></li> <li><a href="teams.html">Teams</a></li>
</ul> </ul>
</div> </div>
<div class="container vh-100"> <form action="login.php" method="post">
<div class="row justify-content-center h-100">
<div class="card w-25 my-auto shadow"> <div class="containerlogin">
<div class="card-header text-center bg-primary text-white"> <h1>Login</h1>
<h2>Login</h2> <p>Please fill in this form to sign in.</p>
</div> <hr>
<div class="card-body"> <label for="email"><b>Email</b></label>
<form action ="readdata.php" method="post"> <input type="text" placeholder="Enter Username" name="email" required>
<div class="form-group"> <br>
<label for="Email">Email </label> <label for="password"><b>Password</b></label>
<input type="Email" id="Email" class="form-control" name="Email" required> <input type="password" placeholder="Enter Password" name="password" required>
<br>
<label for="Passowrds">Password </label> <button class="button" type="submit">Login</button>
<input type="Password" id="Passwords" class="form-control" name="Passwords"required >
</div>
<input type="submit" class="btn btn-primary w-100" value="Login" name="submit">
</form>
</div>
</div>
</div> </div>
</div>
<form> </form>
<input type="button" value="Back to main page" <a href="signup.html"><button class="button">Make new account</button></a>
onclick = "window.open('main.html');" />
</form>
</body> </body>
</html> </html>
\ No newline at end of file
<?php
$servername = "localhost:3306";
$username = "stephanie.smith";
$password = "0lnKdVkBKy";
$dbname = "stephaniesmith_database";
// Create connection
$conn = new mysqli($localhost:3306, $stephanie.smith, $0lnKdVkBKy, $stephaniesmith_database);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT email, password FROM Emails";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "id: " . $row["id"]. " - Name: " . $row["email"]. " " . $row["passsword"]. "<br>";
}
} else {
echo "0 results";
}
$conn->close();
?>
\ No newline at end of file
...@@ -97,5 +97,68 @@ img.teams{ ...@@ -97,5 +97,68 @@ img.teams{
height:60%; height:60%;
margin-left: auto; margin-left: auto;
margin-right:auto; margin-right:auto;
display:block; display:inline-block;
} }
\ No newline at end of file /*login*/
div.containerlogin{
text-align: center;
padding: 50px;
margin-left:auto;
margin-right:auto;
font-family: 'Courier New', Courier, monospace;
color: #000;
font-size: 30px;
}
/*buttons*/
.button {
display: inline-block;
padding: 15px 25px;
font-size: 24px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: orangered;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
text-align: center;
}
.button:hover {background-color: orange}
.button:active {
background-color: orangered;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
/*signup*/
div.containersignup{
text-align: center;
padding: 50px;
margin-left:auto;
margin-right:auto;
font-family: 'Courier New', Courier, monospace;
color: #000;
font-size: 30px;
}
/*tournamenats*/
div.tourn{
text-align: center;
padding: 50px;
margin-left:auto;
margin-right:auto;
font-family: 'Courier New', Courier, monospace;
color: #000;
font-size: 30px;
}
h1.book{
text-align: center;
padding: 50px;
margin-left:auto;
margin-right:auto;
font-family: 'Courier New', Courier, monospace;
color: #000;
font-size: 30px;
}
<html>
<head>
</head>
<body>
<?php
if(isset($_POST['Email'], $_POST['Passwords'])){
<?php
$servername = "localhost:3306";
$username = "stephanie.smith";
$password = "0lnKdVkBKy";
$dbname = "stephaniesmith_database";
$conn=mysqli_connect('localhost:3306','stephanie.smith','0lnKdVkBKy','stephaniesmith_dataa1'); // Create connection
$email = $_POST['Email']; $conn = new mysqli($localhost:3306, $stephanie.smith, $0lnKdVkBKy, $stephaniesmith_database);
$pass = $_POST['Passwords']; // Check connection
$sql="INSERT INTO dataa1 (Email,Passwords) VALUES ('$Email','$Passwords')"; if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO Emails (Email, Passwords)
VALUES ('john@example.com', 'joebloggs')";
if (mysqli_connect_errno()) if ($conn->query($sql) === TRUE) {
{ echo "New record created successfully";
echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else {
} echo "Error: " . $sql . "<br>" . $conn->error;
if (mysqli_query($conn,$sql)) {
echo "Record added";
}
mysqli_close($conn);
} }
$conn->close();
?> ?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>login</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div>
<header class="titlemain"><a href ="main.html" target="_blank">Overwatch League</a></header>
</div>
<div>
<ul><li><a href="login.html">login</a></li>
<li><a href="tournaments.html">Tournaments</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="teams.html">Teams</a></li>
</ul>
</div>
<div id="id01" class="modal">
<form class="modal-content" action="readdata.php">
<div class="containersignup">
<h1>Sign Up</h1>
<p>Please fill in this form to create an account.</p>
<hr>
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" name="email" required>
<label for="password"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<div class="clearfix">
<button type="submit" class="button">Sign Up</button>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>tournaments</title> <title>tournaments</title>
<link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="main.css">
</head> </head>
<body> <body>
<div> <div>
...@@ -18,5 +19,23 @@ ...@@ -18,5 +19,23 @@
<li><a href="teams.html">Teams</a></li> <li><a href="teams.html">Teams</a></li>
</ul> </ul>
</div> </div>
<div class="tourn">
<h1>Tournament dates</h1>
<p>Select the date you would like to attend a tournament.</p>
<form >
<label>Choose a date:</label>
<select name="cars" id="cars">
<option value="29th August 2022">29th August 2022</option>
<option value="20th November 2022">20th November 2022</option>
<option value="1st December 2022">1st December 2022</option>
</select>
<br><br>
</form>
<a href="booked.html"><button class="button">Submit</button></a>
<p>Click the submit button to confirm your date selection</p>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
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 to comment