Need Help

Discussion in 'HTML & Website Design' started by joestuart, Feb 12, 2008.

  1. #1
    Hi...

    Is it possible to insert into a database using Javascript

    I will explain the purpose

    There is a login page and in the database there is a boolean field to confirm whether a user is logged in or not

    So is it possible to add a entry to the database when a user click the submit button of the login form...

    Please answer my question...

    Jodil Davis
    Webmaster
     
    joestuart, Feb 12, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    The short answer is no. (This should be posted in Design&Development>Programming>javascript BTW). Longer answer is AJAX. Better answer is when the login is processed, have the processing script update that field. When and how to determine if a user logs off is another question.
     
    shallowink, Feb 12, 2008 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not without tying the script to a back-end programming language via XMLHTTPRequest (Ajax, or "XHR"). At which point you might as well just use a server-side programming language in the first place.
     
    Dan Schulz, Feb 12, 2008 IP