checking creds in php