insert() argument error solved, pname is not defined error