Commit 1b769fc4 authored by Srinivas's avatar Srinivas
Browse files

Update registrer2.php

parent 666f4536
<html> <html>
<head> <head>
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<title>Log in</title> <title>Log in</title>
</head> </head>
<style> <style>
body { body {
background-color: #F3EBF6; background-color: #F3EBF6;
font-family: 'Ubuntu', sans-serif; font-family: 'Ubuntu', sans-serif;
} }
.main { .main {
background-color: #FFFFFF; background-color: #FFFFFF;
width: 400px; width: 400px;
height: 600px; height: 600px;
margin: 7em auto; margin: 7em auto;
border-radius: 1.5em; border-radius: 1.5em;
box-shadow: 0px 11px 35px 2px rgba(0, 0, 0, 0.14); box-shadow: 0px 11px 35px 2px rgba(0, 0, 0, 0.14);
} }
.submit2 {
.sign { cursor: pointer;
padding-top: 40px; border-radius: 5em;
color: #8C55AA; color: #fff;
font-family: 'Ubuntu', sans-serif; background: linear-gradient(to right, #9C27B0, #E040FB);
font-weight: bold; border: 0;
font-size: 23px; padding-left: 60px;
} padding-right: 60px;
padding-bottom: 10px;
.un { padding-top: 10px;
width: 76%; font-family: 'Ubuntu', sans-serif;
color: rgb(38, 50, 56); margin-left: 70%;
font-weight: 700; margin-right: 9%;
font-size: 14px; font-size: 13px;
letter-spacing: 1px; box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.04);
background: rgba(136, 126, 126, 0.04); }
padding: 10px 20px; .sign {
border: none; padding-top: 40px;
border-radius: 20px; color: #8C55AA;
outline: none; font-family: 'Ubuntu', sans-serif;
box-sizing: border-box; font-weight: bold;
border: 2px solid rgba(0, 0, 0, 0.02); font-size: 23px;
margin-bottom: 50px; }
margin-left: 46px;
text-align: center; .un {
margin-bottom: 27px; width: 76%;
font-family: 'Ubuntu', sans-serif; color: rgb(38, 50, 56);
} font-weight: 700;
font-size: 14px;
form.form1 { letter-spacing: 1px;
padding-top: 40px; background: rgba(136, 126, 126, 0.04);
} padding: 10px 20px;
border: none;
.pass { border-radius: 20px;
width: 76%; outline: none;
color: rgb(38, 50, 56); box-sizing: border-box;
font-weight: 700; border: 2px solid rgba(0, 0, 0, 0.02);
font-size: 14px; margin-bottom: 50px;
letter-spacing: 1px; margin-left: 46px;
background: rgba(136, 126, 126, 0.04); text-align: center;
padding: 10px 20px; margin-bottom: 27px;
border: none; font-family: 'Ubuntu', sans-serif;
border-radius: 20px; }
outline: none;
box-sizing: border-box; form.form1 {
border: 2px solid rgba(0, 0, 0, 0.02); padding-top: 40px;
margin-bottom: 50px; }
margin-left: 46px;
text-align: center; .pass {
margin-bottom: 27px; width: 76%;
font-family: 'Ubuntu', sans-serif; color: rgb(38, 50, 56);
} font-weight: 700;
font-size: 14px;
letter-spacing: 1px;
.un:focus, .pass:focus { background: rgba(136, 126, 126, 0.04);
border: 2px solid rgba(0, 0, 0, 0.18) !important; padding: 10px 20px;
border: none;
} border-radius: 20px;
outline: none;
.submit { box-sizing: border-box;
cursor: pointer; border: 2px solid rgba(0, 0, 0, 0.02);
border-radius: 5em; margin-bottom: 50px;
color: #fff; margin-left: 46px;
background: linear-gradient(to right, #9C27B0, #E040FB); text-align: center;
border: 0; margin-bottom: 27px;
padding-left: 40px; font-family: 'Ubuntu', sans-serif;
padding-right: 40px; }
padding-bottom: 10px;
padding-top: 10px;
font-family: 'Ubuntu', sans-serif; .un:focus, .pass:focus {
margin-left: 35%; border: 2px solid rgba(0, 0, 0, 0.18) !important;
font-size: 13px;
box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.04); }
}
.submit {
.forgot { cursor: pointer;
text-shadow: 0px 0px 3px rgba(117, 117, 117, 0.12); border-radius: 5em;
color: #E1BEE7; color: #fff;
padding-top: 15px; background: linear-gradient(to right, #9C27B0, #E040FB);
} border: 0;
padding-left: 40px;
a { padding-right: 40px;
text-shadow: 0px 0px 3px rgba(117, 117, 117, 0.12); padding-bottom: 10px;
color: #E1BEE7; padding-top: 10px;
text-decoration: none font-family: 'Ubuntu', sans-serif;
} margin-left: 35%;
font-size: 13px;
@media (max-width: 600px) { box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.04);
.main { }
border-radius: 0px;
} .forgot {
text-shadow: 0px 0px 3px rgba(117, 117, 117, 0.12);
</style> color: #E1BEE7;
padding-top: 15px;
<body> }
<div class="main">
a {
<p class="sign" align="center">Sign Up</p> text-shadow: 0px 0px 3px rgba(117, 117, 117, 0.12);
color: #E1BEE7;
<form class="form1" method="POST" action="" > text-decoration: none
<input class="un " type="text" name="user_id" align="center" placeholder="Username"><br> }
<input class="pass" type="password" name="user_pass" align="center" placeholder="Password">
<input class="pass" type="password" name="user_pass1" align="center" placeholder="Confirm Password"> @media (max-width: 600px) {
<input class="submit" type="submit" align="center" type="submit" name="search" value="Sign in"> .main {
<center> border-radius: 0px;
<img src="kl.jpg" alt="Snow" style="width:228px;height:228px;"> }
</center>
</form>
</div> </style>
<table>
<?php <body>
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,'test'); <p class="submit2" align="center">
if(isset($_POST['search'])) <?php echo '<a href="manage.html">Go back to home page</a>' ?></p>
{ <div class="main">
<p class="sign" align="center">Sign Up</p>
if (isset($_POST['user_id']) and isset($_POST['user_pass']) and isset($_POST['user_pass1'])){ <form class="form1" method="POST" action="" >
<input class="un " type="text" name="user_id" align="center" placeholder="Username"><br>
// Assigning POST values to variables. <input class="pass" type="password" name="user_pass" align="center" placeholder="Password">
$username = $_POST['user_id']; <input class="pass" type="password" name="user_pass1" align="center" placeholder="Confirm Password">
$password = $_POST['user_pass']; <input class="submit" type="submit" align="center" type="submit" name="search" value="Sign Up">
$cpassword= $_POST['user_pass1']; <center>
<img src="kl.jpg" alt="Snow" style="width:228px;height:228px;">
if ($cpassword==$password){ </center>
$conn = new mysqli('localhost','root','','test'); </form>
if($conn->connect_error){ </div>
die('Connection Failed : '.$conn->connect_error);
} <table>
else{ <?php
$stmt = $conn->prepare("insert into user_login(username,Password) $connection = mysqli_connect("localhost","root","");
values(?,?)"); $db = mysqli_select_db($connection,'test');
$stmt->bind_param("ss",$username,$password); if(isset($_POST['search']))
$stmt->execute(); {
$stmt->close();
$conn->close();
}
session_start(); if (isset($_POST['user_id']) and isset($_POST['user_pass']) and isset($_POST['user_pass1'])){
header("Location:3.php");
} // Assigning POST values to variables.
} $username = $_POST['user_id'];
else{} $password = $_POST['user_pass'];
} $cpassword= $_POST['user_pass1'];
?> </table></center></body>
if ($cpassword==$password){
$conn = new mysqli('localhost','root','','test');
if($conn->connect_error){
die('Connection Failed : '.$conn->connect_error);
}
else{
$stmt = $conn->prepare("insert into user_login(username,Password)
values(?,?)");
$stmt->bind_param("ss",$username,$password);
$stmt->execute();
$stmt->close();
$conn->close();
}
session_start();
header("Location:success.php");
}
}
else{}
}
?> </table></center></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