Registration form

that is not an error message, what does your corona logs say

I’m not getting any errors that’s all it says 

Can you post a screen shot?

Corona opens up a console log. It’s a white window behind your simulator. Please copy and paste the message from there.

Yeah that’s all it shows Something went wrong. Try again.

please post screen shot of where you are seeing this.

Warning: Could not load font HelveticaNeue-Light. Using default font. Warning: Could not load font HelveticaNeue-Light. Using default font. Something went wrong. Try again.

I’m seeing this on my Corona Simulator Output 

I see

local function userRegister( event ) if ( "began" == event.phase ) then local URL = "http://hash.comxa.com/register.php?username=" .. ( username.text ) .. "&pw=" .. (pw.text) .. "&email=" .. ( email.text ) network.request(URL, "GET", networkListener) else print( "Something went wrong. Try again.") end end

What’s the problem 

How is this being called?

can you post your lua code again since you made the changes I recommended?

local composer = require( "composer" ) local scene = composer.newScene() local widget = require("widget") -- forward declare the text fields local json = require("json") local username local password local email local function urlencode(str) if (str) then str = string.gsub (str, "\n", "\r\n") str = string.gsub (str, "([^%w])", function (c) return string.format ("%%%02X", string.byte(c)) end) str = string.gsub (str, " ", "+") end return str end local function userRegister( event ) if ( "ended" == event.phase ) then local URL = "http://hash.comxa.com/register.php?Register=1&username=" .. username.text .. "&password=" .. password.text .. "&password2=" .. password2.text .. "&email=" .. urlencode( email.text ) network.request(URL, "GET", networkListener) else print( "Something went wrong. Try again.") end end local function networkListener( event ) if ( event.isError ) then print( "Network error. ") else if event.response == "success" then print("Success! We are now registered!") -- put the code here to go to where the user needs to be -- after a successful registration composer.gotoScene("login") else -- put code here to notify the user of the problem, perhaps -- a native.alert() dialog that shows them the value of event.response -- and take them back to the registration screen to let them try again local alert = native.showAlert( "You are not connected to the Internet. ", { "Try again"}, onComplete ) end end end local function loginLink( event ) if ( "ended" == event.phase ) then composer.gotoScene("login") end end function scene:create(event) local screenGroup = self.view display.setDefault("background", 0, 3, 5) local icon = display.newImage("hash\_opt.png", 160, 70) screenGroup:insert(icon) username = native.newTextField( 160, 200, 180, 30 ) -- take the local off since it's forward declared username.placeholder = "Username" screenGroup:insert(username) password = native.newTextField( 160, 250,180, 30 ) -- take the local off since it's forward declared password.isSecure = true password.placeholder = "Password" screenGroup:insert(password) password2 = native.newTextField( 160, 300,180, 30 ) -- take the local off since it's forward declared password2.isSecure = true password2.placeholder = "Confirm Password" screenGroup:insert(password2) email = native.newTextField( 160, 350, 180, 30 ) -- take the local off since it's forward declared email.placeholder = "E-mail" screenGroup:insert(email) local Button = widget.newButton( { shape = "roundedRect", left = 70, top = 400, id = "Register", label = "Register", onEvent = userRegister } ) screenGroup:insert(Button) local Button2 = widget.newButton( { left = 70, top = 460, id = "Loginhere", label = "Login here", onEvent = loginLink } ) screenGroup:insert(Button2) end function scene:show(event) end function scene:hide(event) end function scene:destroy(event) end scene:addEventListener("create", scene) scene:addEventListener("show", scene) scene:addEventListener("hide", scene) scene:addEventListener("destroy", scene) return scene

There are two phase for buttons began and ended. When you first push the button (began) you are triggering

 print( "Something went wrong. Try again.")

You can remove

local function userRegister( event ) if ( "ended" == event.phase ) then local URL = "http://hash.comxa.com/register.php?Register=1&username=" .. username.text .. "&password=" .. password.text .. "&password2=" .. password2.text .. "&email=" .. urlencode( email.text ) network.request(URL, "GET", networkListener) --else --this --print( "Something went wrong. Try again.") -- this end end

Your telling me to remove the whole function ?

no this

--else --this --print( "Something went wrong. Try again.") -- this

Ok but I still don’t go to the login page

Are you getting

“Success! We are now registered!”

In logs?

No

what is your event.response on your networkListener?