Results 1 to 4 of 4

Thread: Connecting to a database

  1. #1
    Join Date
    Jul 2008
    Posts
    65
    Thanks
    42
    Thanked 0 Times in 0 Posts

    Default Connecting to a database

    I was just wonder if anyone could give me help with how to connect to a MySQL database in JavaScript. Thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    There's no way unless you used ajax. But it would still need a serverside. Check out ajax:
    http://www.w3schools.com/Ajax/Default.Asp
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    hosdank (08-03-2008)

  4. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Why would you want to connect to a database with JavaScript? Even if you did get it to work with Ajax, think about how insecure it is? Server-side languages execute behind the HTML output, however JavaScript does not - hence the term client-side.

    So any database information would be in your HTML source.
    - Mike

  5. The Following User Says Thank You to mburt For This Useful Post:

    hosdank (08-03-2008)

  6. #4
    Join Date
    Jul 2008
    Posts
    65
    Thanks
    42
    Thanked 0 Times in 0 Posts

    Default

    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •