# How to authenticate user on frontend via php

**URL:** <https://discourse.getcockpit.com/t/how-to-authenticate-user-on-frontend-via-php/1128>\
**Category:** General\
**Created:** [December 20, 2019, 1:10pm UTC](https://discourse.getcockpit.com/t/how-to-authenticate-user-on-frontend-via-php/1128 "2019-12-20T13:10:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheIpHunter](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@TheIpHunter](https://discourse.getcockpit.com/u/TheIpHunter)\
**Post date:** [December 20, 2019, 1:10pm UTC](https://discourse.getcockpit.com/t/how-to-authenticate-user-on-frontend-via-php/1128/1 "2019-12-20T13:10:31Z")

</div>

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?
