Jump to content

Pengcoder

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Pengcoder

  • Rank
    Newbie
  1. Hi Barand thankyou new to PHP but code above does look right?
  2. $("#loginform").submit(function(event){ //prevent default php processing event.preventDefault(); //collect user inputs var datatopost = $(this).serializeArray(); console.log(datatopost); //send them to login.php using AJAX $.ajax({ url: 'login.php', type: "POST", data: datatopost, success: function(data){ if(data == "success"){ window.location('mainpageloggedin.php'); }else{ $("#loginmessage").html(data); } }, error:function(){ $("#loginmessage").html('<div class="alert alert-danger">There was an error with the Ajax Call. Please try again later1.</div>'); } }); });
  3. Please help with Ajax call, when clicking login button nothing happens when it should go to mainpageloggedin.php deano
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.