Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AJAX/jQuery and MySQL?

Can AJAX communicate with MySQL directly? For example, I just have a simple text box and with a trigger of a function it checks the database if the word is in there. If I wanted to use JSP, how will it be implemented? Can it be possible with jQuery? Or could I just create a JSON with all the words I have?

Thanks.

like image 916
ton Avatar asked Nov 27 '25 03:11

ton


1 Answers

AJAX runs clientside, and the code can be modified by any client that executes it. You should not have a direct connection to your database using AJAX, always put a server-side script in between to protect your database.

Even if it were technically possible, you should not be doing this.

like image 144
Konerak Avatar answered Nov 29 '25 16:11

Konerak