+ 1

Can I use JavaScript/Ajax to display user specific data on a html page from MS SQL db?

I am just trying to find all possible ways to display user specific data from MS SQL DB on HTML.

30th Apr 2018, 5:00 AM
Muthiah Abbhirami
Muthiah Abbhirami - avatar
2 Antworten
+ 4
Yes. You would want to have a script (in a back-end language such as PHP or Node.js). Then create an AJAX request that calls to the script with certain POST/GET parameters like username and information you want to retrieve. Then in the script, grab the parameters provided and perform a DB query. Take the DB query output and convert it into a format such as JSON or XML and echo it out to the page. When the AJAX call loads the script with the parameters, the script will retrieve the information and it'll be sent as the response in the JS. Then you can take the response and separate the JSON or XML values and display them as needed.
3rd May 2018, 1:09 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
@Ben Allen Thank you! :)
3rd May 2018, 1:10 AM
Muthiah Abbhirami
Muthiah Abbhirami - avatar