Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/public.userinfo',(request, response) => {
- client.query('SELECT * FROM userinfo WHERE userin_id, username=$1 AND password=$2 '[request.body.username, request.body.password],
- result => response.send(result.row)
- )
- .catch(console.error);
- });
- $.ajax({
- url:`public.userinfo`,
- method:'GET',
- dataType: 'json',
- data: {username:this.username, password:this.password, win:this.win, loss:this.loss},
- success: function(result){
- console.log(result);
- },
- error:function(err){
- console.log(err);
- }
- });
- <form class="login" method= "GET" action="/public.userinfo" id="login">
- <input type="text" name="username" id="username" class="username">
- <input type="password" name="password" id="password" class="password">
- <button value="submit" name="login" id="loginButton">Login</button>
- <span id="login_message"></span>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement