D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
updaterecordpass2.php
back
Copy
<?php if(isset($_POST['updatepass'])){ $id=$_POST['sn']; unset($temp); if(isset($_POST['newpass'])){ $_POST['newpass']=trim($_POST['newpass']); if(preg_match('/^[a-zA-Z0-9^$.*+\[\]{,}]/u',$_POST['newpass'])) $temp=$_POST['newpass']; } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $np=$temp; unset($temp); if(isset($_POST['confirmnewpass'])){ $_POST['confirmnewpass']=trim($_POST['confirmnewpass']); if(preg_match('/^[a-zA-Z0-9^$.*+\[\]{,}]/u',$_POST['confirmnewpass'])) $temp=$_POST['confirmnewpass']; } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $cnp=$temp; if ($np != $cnp){ $dd="<p style='color:#ff0000'>Please confirm the New Password correctly</p>"; include("changepass2.php"); exit(); } require_once('Connecter/dataconn.php'); $sql=sprintf("update lecturers set passwrd='%s' where sn=$id", mysql_real_escape_string($np)); if (mysql_query($sql)){ include("logout3.php"); } else { $dd="<p>Error performing update: " . mysql_error() . "</p>"; include("changepass2.php"); } } ?>