Dear folks,
pls help me out.
i have written a code to change password. it works perfectly i.e. sql query "update is ok", now i want to display number of affected rows that i can inform user if password is changed or not. here is my code pls help out.
i could find which property to use.
using php to connect to ms access(dsn connection).



here is my code

<?php

Class changepin {
function changepin($oldpwd,$newpwd,$cnewpwd){
$this->oldpwd=$oldpwd;
$this->newpwd=$newpwd;
$this->cnewpwd=$cnewpwd;

//echo "submitted values:".$uid,$pwd;
if(isset($oldpwd)&&isset($newpwd)&&isset($cnewpwd)){
require_once "conn.php";
session_start();
$uid=$_SESSION['uid'];
$query="update biodata set pwd='$newpwd' where uid='$uid'";
if(!odbc_exec($connect,$query)){echo "Error executing query:".$query;}
else{$result=odbc_exec($connect,$query);}
$row_num=odbc_fetch_row($result);
echo $row_num;
if($row_num==0){
echo "Failed";}
else{session_start();
$_SESSION['uid']=$uid;
echo "Successful"; }//end inner if statement
odbc_close($connect);
}//close of outer if
}//close method
}//close class

if((isset($_POST['oldpwd'])&&isset($_POST['newpwd'])&&isset($_POST['cnewpwd']))&&($_POST['newpwd']=$_POST['cnewpwd'])){
$oldpwd=$_POST['oldpwd'];
$newpwd=$_POST['newpwd'];
$cnewpwd=$_POST['cnewpwd'];

new changepin($oldpwd,$newpwd,$cnewpwd);
}// close of if statement
else{
header("location: changepin.php");
}
?>

expecting ur reply soonest.