public static function addStudentContact($con, $studentId, StudentContact $contact) { try { //echo "thiss"; $sql = $con->prepare("INSERT INTO studentcontact VALUES (?,?)"); $cont = $contact->getContactNo(); //$cont="222"; //echo $cont; $sql->bind_param("ss", $studentId, $cont); if ($sql->execute() == TRUE) { return true; } else { return false; } } catch (Exception $w) { return false; } }