Show else statement

I wrote code in PHP to check if the username and email is in use if so the user can’t sign up , and it works . But my problem is that when I use a username that’s in the database to register , nothing happens which means that the PHP code works . But how do I show the else statement in corona ? 

And also how do I check if the user entered an email in the email field ? for example if they put “22” or “aa” it signs the user up 

You would have to echo “this are signed up already”;

As for the email, there is no way to be certain that a email is a real email unless you send a confirmation email, which you should research yourself(ethier do it on sever or use service like http://www.mailgun.com) You can make sure the email has the right format: https://coronalabs.com/blog/2013/04/16/lua-string-magic/

How do I echo that in corona ?

“echo” is a PHP command to output information. In Corona you use:   print()

You would have to echo “this are signed up already”;

As for the email, there is no way to be certain that a email is a real email unless you send a confirmation email, which you should research yourself(ethier do it on sever or use service like http://www.mailgun.com) You can make sure the email has the right format: https://coronalabs.com/blog/2013/04/16/lua-string-magic/

How do I echo that in corona ?

“echo” is a PHP command to output information. In Corona you use:   print()