View Full Version : Connecting to a database
hosdank
08-03-2008, 01:21 AM
I was just wonder if anyone could give me help with how to connect to a MySQL database in JavaScript. Thanks :)
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
mburt
08-03-2008, 03:48 AM
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.
hosdank
08-03-2008, 05:54 PM
Thanks :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.