<?php require 'includes/head2.php';?>
<div class="form" id="form" align="left"style="margin-top:10px;">
<?php

	if(isset($_POST['add']))
	{	
		require '../connections/conn.php';
		
		
		$n=$_POST['d_name'];
		$u=$_POST['username'];
		$p=$_POST['pass'];
		
			$options1 = ['cost1' => 10,'salt1' => '91BnO-2011-HaW89'];
				$p=crypt($p, $options1['salt1']);
		
				$insert_country="insert into `doctor`(`d_name`,`username`,`password`)VALUES('$n','$u','$p')";
				$result = $conn->query($insert_country);
				
				echo "<script type='text/javascript'>window.location.href = 'doctor_pass.php'</script>";
			
		
	}
	
?>
<form action="" method="POST" enctype="multipart/form-data">
	<input style="font-size:20pt;width:12em; background-color:#ffffff; border-style:none" type="text" name="d_name" placeholder="Name" required><br><br>
	<input style="font-size:20pt;width:12em; background-color:#ffffff; border-style:none" type="text" name="username" placeholder="Username" required><br><br>
	<input style="font-size:20pt;width:12em; background-color:#ffffff; border-style:none" type="password" name="pass" placeholder="Password" ><br><br>
	<input type="submit" name="add" value="ADD"style="font-size:20pt;width:12em; background-color:#000000; color:#ffffff; border-style:none">
</form>



<?php require 'includes/foot.php';?>