Cant make a controll work

Im making a regestration form on my server first time you join. But i cant get the code to work. It should check if both Name and Pass is filled, else it do nothing.
Can somebody please help me, people are bypassing this.

DermaButton.DoClick = function ()
if(Name:GetValue() == "" or Pass:GetValue() == "") then
else
RunConsoleCommand("adduserdb", Name:GetValue(), Pass:GetValue(),"<hash key so people cant abuse the regeration form by creating many accounts>")
DermaPanel:Close()
end
end

[lua]DermaButton.DoClick = function()
local name,pass = Name:GetValue(), Pass:GetValue()
if name != “” and pass != “” then
RunConsoleCommand(“adduserdb”,name,pass,“haskey”)
DermaPanel:Close()
end
end
[/lua]

Your code is a little strange.

oh i thought that you couldnt use != in lua
thanks

You can in the Garrysmod implementation because Garry hacked it in. The lua equivalent is ~=

ok thanks