How to make an account system (php ig)

strange, it should take you back to the login page, I’ll look into that

@QwertyQwerty88 Maybe I worded it wrong. I made a mistake and tried to log in when there was no account. The site then had an ERROR 500 rather than taking me to the signup page. I would like the site to not crash when people like me try to log in without signing up.

1 Like

No no, I believe I understood it fine. Try it again, think I fixed the problem

1 Like

That fixed it, whatever you did. I also got the original (whatever I first forked) working by adding this. We are now set. This is exciting!

@app.errorhandler(500)
def internal_error(error):
  return render_template('sign-up.html')
1 Like

Well yeah, that does work, but you can just make sure your login route looks similar to this:

	if db.get(username) == password: # .get() is important
		return redirect('/home')
	return redirect('/login') # change to /sign-up if you want

and there shouldn’t be any errors!

now i need a game uploading system