How to authenticate user on frontend via php

Hi,
I’m trying to build a login form where a user of a frontend (webpage) needs to login.
How would this be done via php.
Form is clear but how can I verify user and password via cockpit?