Here's a quick hint so you can make it work.
Learn English
Learn PHP
Understand LUA & GG API
Your lua script should look like this.
local login = 'https://localhost/login.php'
local user = gg.prompt(
{'Username', 'Password'},
{},
{[1]='text',[2]='text'}
)
if user[1] == '' or user[2] == '' then
gg.alert ("Username or Password is Empty!")
else
data = gg.makeRequest(login, nil, 'username='..user[1]..'&password='..user[2]).content
end
if data == '0' then
print ("Login failed, please try again.")
elseif data == '1' then
print ("Login succesfull")
end