Skip to content
Snippets Groups Projects
Commit 0d7d6ae4 authored by Oviya Balamurugan's avatar Oviya Balamurugan
Browse files

new user register code

parent 1daf4852
No related branches found
No related tags found
No related merge requests found
new.php 0 → 100644
<?php
include "database.php";
?>
<!DOTYPE HTML>
<html>
<head>
<title>BOOK MANAGEMENT SYSTEM</title>
<link rel="stylesheet" type ="text/css" href="css/style.css">
</head>
<body>
<div id="container">
<div id="header">
<h1>BOOK MANAGEMENT SYSTEM</h1>
</div>
<div id="wrapper">
<h3 id="heading">new user registration</h3>
<div id="center">
<?php
if(isset($_POST["submit"]))
{
$sql="insert into student(NAME,PASS,MAIL,DEP) values('{$_POST["name"]}','{$_POST["pass"]}','{$_POST["mail"]}','{$_POST["dep"]}')";
$mysqli->query($sql);
echo "<p class='success'>user registration success</p>";
}
?>
<form action ="<?php echo $_SERVER["PHP_SELF"];?>" method="post" >
<label>name</label>
<input type ="text" name="name" required>
<label>Password</label>
<input type="password" name="pass" required>
<label>Email ID</label>
<input type="email" name="mail" required>
<select name="dep">
<option value"BCA">BCA</option>
<option value"CSE">CSE</option>
<option value"BSC">BSC</option>
<option value"OTHER">OTHERS</option>
</select>
<button type="submit" name="submit">Register now</button>
</form>
</div>
</div>
<div id="navi">
<?php
include "sidebar.php"
?>
</div>
<div id="footer">
<p>Copyright &copy; book management 2020</p>
<div>
</div>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment