def join(): email = request.form['email'] password = request.form['password'] name = request.form['name'] print(email) print(password) print(name) ret = dbdb.check_email(email) if ret != None: # return render_template('errid.html') return '아이디있다' dbdb.insert_user(email, password, name) # return redirect(url_for('login')) return redirect(url_for('new'))
def join(): if request.method == 'GET': return render_template('join.html') else: id = request.form['id'] pw = request.form['pw'] name = request.form['name'] ret = dbdb.check_id(id) if ret != None: return ''' <script> alert('이미 존재하는 아이디입니다.'); location.href='/join'; </script> ''' dbdb.insert_user(id, pw, name) return redirect(url_for('login'))
def join(): if request.method == 'GET': return render_template('join.html') else: id = request.form['id'] passward = request.form['passward'] name = request.form['name'] print (id,type(id)) print (passward,type(passward)) ret = dbdb.check_id(id) if ret != None: return ''' <script>alert('다른아이디를 사용하세요'); location.href='/join'; ''' dbdb.insert_user(id, passward) return redirect(url_for('login'))
def join(): if request.method == 'GET': return render_template('join.html') else: id = request.form["id"] pw = request.form["pw"] name = request.form["name"] ret = dbdb.check_id(id) if ret != None: return ''' <script> alert('다른 아이디를 사용하세요'); location.href='/join'; </script> ''' # id와 pw가 db 값이랑 비교 해서 맞으면 맞다 틀리면 틀리다 dbdb.insert_user(id, pw, name) return redirect(url_for('login'))
def join(): if request.method == 'GET': return render_template('join.html') else: id = request.form['id'] pw = request.form['pw'] name = request.form['name'] print(id, type(id)) print(pw, type(pw)) ret = dbdb.check_id(id) if ret != None: return ''' <script>alert('이미 아이디를 사용중입니다.'); location.href='/join'; </script> ''' else: dbdb.insert_user(id, pw, name) return '''