<?php 
include "scrinit.php";
include $menu;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
var answer = confirm ("Παρακαλώ επιβεβαίωσε. ")
if (!answer)
window.location="<?php echo $menu;?>"

// -->
</script>
</head>

<body>

<?php
require "dbconnect.php";
mysqli_query($con,"CREATE TABLE teachersn SELECT * FROM teachers ");

$sql1=mysqli_query($con,"SELECT pass FROM teachers ");
while($row=mysqli_fetch_array($sql1))
{
   $oldpass=$row['pass'];
   $hash = password_hash($oldpass, PASSWORD_DEFAULT);
   $sql=mysqli_query($con,"UPDATE teachers SET pass='$hash' where pass='$oldpass' ");
}
?>
<br /><br />
<h3> Η διαδικασία "HASHING" έχει ολοκληρωθεί με επιτυχία. Μην ξεχάσετε να ορίσετε την παράμετρο! </h3>
<br /><br /><br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού  </a>

</body>
</html>
