rewrite using mysqli

ui still don’t  work