Realised how poorly worded my question was so I'm reposting it for ease on all parties.
I've been working on a project for a while, and have come to an annoying standstill. I'm looking for a browser based solution that will allow me to, when pushing a button on a keyboard, send a value to a MySQL database. AJAX is probably the thing that will help me most but I have no idea how to implement it this way, any insight would be great! Hope I'm not aiming for the impossible here, thanks to anyone who replies!
-
You should really read this stackoverflow.com/help/how-to-askIonut Necula– Ionut Necula2016年11月02日 11:13:15 +00:00Commented Nov 2, 2016 at 11:13
-
you can do it from JS, but only via a server-side language such as PHP. So your JS makes an ajax request to the server, which processes the request, interacts with the database and returns the result back to the (JS) client. There are approximately 7 billion tutorials on this on the web, it's fairly straightforward to get a simple scenario working :-)ADyson– ADyson2016年11月02日 13:22:52 +00:00Commented Nov 2, 2016 at 13:22
1 Answer 1
JS or jQuery works client-side, you need a server-side language such as ROR,php,asp.net, etc to do that. Simply not possible with JS or jQuery.