Question: I'm trying to make a login script with web.py but i cant seem to figure it out!

I'm using MySQLdb for the database engine.

Here are the two approaches I have but neither seem to be working. if someone can help me it would be very much appreciated.

Method 1

```
class login():
    def GET(self):
        return render.login()
    def POST(self):
        i = web.input()
        d = i.username
        email = db.select('users', where='email')

        if d == email:
            return"Success!"
        else:
            return"Nahh"

```

Method 2

```
class login():
    def GET(self):
        return render.login()
    def POST(self):
        i = web.input()
        u = i.username
        p = i.password
        d = db.query("SELECT * FROM users WHERE username=i.username AND password=i.password")
        g = db.num_rows(d)
        if g == 1:
            return "Success!"
        if g != 1:
            return "Fail!"

```

What am I doing wrong? I'm still new to Web.py and I know the first example doesn't really make sense... but its just a theory I had if that makes sense.

Answer: 
Free versions will have IsTrial=false - they are essentially purchased for $0
Take a look at this : <http://invokeit.wordpress.com/2011/09/20/free-trial-and-paid-apps/>