if ($oldpass=="" or $newpass=="" or $newpass2=="" or $newpass<>$newpass2) {
echo "<center><h3> Error.!! : New Password no match </h3>";
echo "<center>[ <a href=changpass.php>Back</a> ]";
exit();
}
$dbname="radius";
$con = mysql_connect("localhost","root","abc123");
mysql_select_db($dbname, $con);
$sql = "SELECT * FROM user WHERE Value='$oldpass'";
$result = mysql_query($sql,$con);
$rows = mysql_num_rows($result);
if ($rows==1){
$sql1="UPDATE user SET Value ='$newpass' WHERE Value='$oldpass' ";
$result1=mysql_db_query($dbname,$sql1);
$sqll="UPDATE radcheck SET Value ='$newpass' WHERE Value='$oldpass' ";
$resultt=mysql_db_query($dbname,$sqll);
<?
if ($oldpass=="" or $newpass=="" or $newpass2=="" or $newpass<>$newpass2) {
?>
<script language="javascript">
alert('กรุณากรอกรหัส')
window.location="changpass.php";
</script>