Commit 1b84877a authored by stephanie.smith's avatar stephanie.smith

php

parent 5e0d4a21
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<li><a href="teams.html">Teams</a></li> <li><a href="teams.html">Teams</a></li>
</ul> </ul>
</div> </div>
<html>
<div class="container vh-100"> <div class="container vh-100">
<div class="row justify-content-center h-100"> <div class="row justify-content-center h-100">
<div class="card w-25 my-auto shadow"> <div class="card w-25 my-auto shadow">
...@@ -29,13 +28,13 @@ ...@@ -29,13 +28,13 @@
<div class="card-body"> <div class="card-body">
<form action ="readdata.php" method="post"> <form action ="readdata.php" method="post">
<div class="form-group"> <div class="form-group">
<label for="email">Email </label> <label for="Email">Email </label>
<input type="email" id="email" class="form-control" name="email" required> <input type="Email" id="Email" class="form-control" name="Email" required>
<label for="pass">Password </label> <label for="Passowrds">Password </label>
<input type="pass" id="pass" class="form-control" name="pass"required > <input type="Password" id="Passwords" class="form-control" name="Passwords"required >
</div> </div>
<input type="submit" class="btn btn-primary w-100" value="Login" name=""> <input type="submit" class="btn btn-primary w-100" value="Login" name="submit">
</form> </form>
</div> </div>
</div> </div>
......
...@@ -3,22 +3,23 @@ ...@@ -3,22 +3,23 @@
</head> </head>
<body> <body>
<?php <?php
if(isset($_POST['email'], $_POST['pass'])){ if(isset($_POST['Email'], $_POST['Passwords'])){
$conn=mysqli_connect('localhost:3306','stephanie.smith','0lnKdVkBKy','stephaniesmith_database'); $conn=mysqli_connect('localhost:3306','stephanie.smith','0lnKdVkBKy','stephaniesmith_dataa1');
$sql="INSERT INTO dataa (Email,Passwords) VALUES ('$email','$pass')"; $email = $_POST['Email'];
$email = $_POST['email']; $pass = $_POST['Passwords'];
$pass = $_POST['pass']; $sql="INSERT INTO dataa1 (Email,Passwords) VALUES ('$Email','$Passwords')";
if (mysqli_connect_errno())
{ if (mysqli_connect_errno())
echo "Failed to connect to MySQL: " . mysqli_connect_error(); {
} echo "Failed to connect to MySQL: " . mysqli_connect_error();
if (mysqli_query($conn,$sql)) { }
echo "Record added"; if (mysqli_query($conn,$sql)) {
} echo "Record added";
mysqli_close($conn); }
mysqli_close($conn);
} }
?> ?>
......
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