function select($str1) { $ob = new logic(); $a = $ob->getresult($str1); if ($a) { echo $a; return $a; } else { echo "database not found"; } }
function validstudent() { parent::get_connection(); parent::selectdb(); $str = "select userid,password from student_info where userid='{$this->userid}' and password='******';"; parent::getresult($str); if (mysql_affected_rows() > 0) { return true; } else { return false; } }