+ 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.
2 Réponses
+ 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.
0
@Ben Allen Thank you! :)