diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-09 04:50:17 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-09 04:50:17 +0300 |
| commit | a584bf73b6d64dad98f150caba0f25e790cde010 (patch) | |
| tree | 76c47f080248ebc97f6ae14fdaa364c2f1750b8d /html/app/views/user/login.php | |
| parent | 45d853b343b485bff7e6089e2689dba5f7d901cf (diff) | |
| download | classroom-a584bf73b6d64dad98f150caba0f25e790cde010.tar.gz classroom-a584bf73b6d64dad98f150caba0f25e790cde010.tar.bz2 classroom-a584bf73b6d64dad98f150caba0f25e790cde010.zip | |
user registration and login scenarios
Diffstat (limited to 'html/app/views/user/login.php')
| -rw-r--r-- | html/app/views/user/login.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/html/app/views/user/login.php b/html/app/views/user/login.php index 4451d52..dbfb2e5 100644 --- a/html/app/views/user/login.php +++ b/html/app/views/user/login.php @@ -60,4 +60,32 @@ </div> </div> </body> + +<script> + // When form is submited + // ------------------------------------------------------------------------- + + $('.content form').submit( event => { + event.preventDefault(); + + + // prepare data to POST + var data = { + email: $('input[name=email]').val(), + password: $('input[name=password]').val() + }; + + // select action url (add or update) + var request = '/account/check-login'; + + // send POST request + $.post(request, data) + .done(function( data ) { + console.log(data); + }); + + + }); +</script> + </html> |
