if ($oldpass=="" or $newpass=="" or $newpass2=="" or $newpass<>$newpass2) {
echo "<center><h3> Error.!! : กรุณากรอกข้อมูลให้ครบด้วยค่ะ</h3>"; exit();
}
include "connect_db.php"; (ตรงนี้ครับที่ผมinclud ไฟล์ข้างบนมาใช้
$sql="select * from admin where username='$authuser' and password='$oldpass' ";
$result=mysql_db_query($dbname,$sql);
$num=mysql_num_rows($result);
if ($num<1) {
echo "<center><h3>Error.!! : ขออภัยค่ะ..รหัสผ่านเดิมไม่ถูกต้องค่ะ</h3>"; exit();
}
$sql="update admin set password='$newpass' where username='$authuser' ";
$result=mysql_db_query($dbname,$sql);
if ($result) {
echo "<center><h2>เปลี่ยนรหัสผ่านเรียบร้อยค่ะ</h2>";
Warning: include(confic.ini.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\PHPbasic\check_changepw.php on line 35
Warning: include() [function.include]: Failed opening 'confic.ini.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\PHPbasic\check_changepw.php on line 35
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\PHPbasic\check_changepw.php on line 39